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))
|
||||
mid=$((bottom / 4 < 5 ? 1 : bottom / 4))
|
||||
|
||||
[ -e "$1" ] || case $1$# in
|
||||
'*1') set -- empty ;;
|
||||
'.[!.]*1') set -- 'no hidden files'
|
||||
case $# in
|
||||
1) [ -e "$1" ] || set -- empty
|
||||
esac
|
||||
|
||||
case $hist in
|
||||
|
@ -331,8 +330,8 @@ main() {
|
|||
|
||||
.?)
|
||||
case ${hidden:=1} in
|
||||
1) hidden=0; set -- .[!.]* ;;
|
||||
*) hidden=1; set -- * ;;
|
||||
1) hidden=0; set -- .* ;;
|
||||
0) hidden=1; set -- *
|
||||
esac
|
||||
|
||||
y=1 y2=1 cur=$1
|
||||
|
|
Loading…
Reference in New Issue