mirror of https://github.com/dylanaraps/shfm.git
shfm: fix glob issues with hidden files
Let's just allow '.' and '..' to appear in the list as they are fully functional entries after all. Also removes the need for a "no hidden files" message.
This commit is contained in:
parent
b8efa71b97
commit
8920178753
9
shfm
9
shfm
|
@ -136,9 +136,8 @@ list_print() {
|
||||||
end=$((bottom + 1))
|
end=$((bottom + 1))
|
||||||
mid=$((bottom / 4 < 5 ? 1 : bottom / 4))
|
mid=$((bottom / 4 < 5 ? 1 : bottom / 4))
|
||||||
|
|
||||||
[ -e "$1" ] || case $1$# in
|
case $# in
|
||||||
'*1') set -- empty ;;
|
1) [ -e "$1" ] || set -- empty
|
||||||
'.[!.]*1') set -- 'no hidden files'
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $hist in
|
case $hist in
|
||||||
|
@ -331,8 +330,8 @@ main() {
|
||||||
|
|
||||||
.?)
|
.?)
|
||||||
case ${hidden:=1} in
|
case ${hidden:=1} in
|
||||||
1) hidden=0; set -- .[!.]* ;;
|
1) hidden=0; set -- .* ;;
|
||||||
*) hidden=1; set -- * ;;
|
0) hidden=1; set -- *
|
||||||
esac
|
esac
|
||||||
|
|
||||||
y=1 y2=1 cur=$1
|
y=1 y2=1 cur=$1
|
||||||
|
|
Loading…
Reference in New Issue