mirror of
https://github.com/dylanaraps/shfm.git
synced 2026-11-21 19:51:41 +00:00
clearer empty dir, no results, etc. Closes #16
This commit is contained in:
1 file changed
+10
@@ -136,6 +136,11 @@ list_print() {
|
|||||||
end=$((bottom + 1))
|
end=$((bottom + 1))
|
||||||
mid=$((bottom / 4 < 5 ? 1 : bottom / 4))
|
mid=$((bottom / 4 < 5 ? 1 : bottom / 4))
|
||||||
|
|
||||||
|
case $1$# in
|
||||||
|
'*1') set -- empty ;;
|
||||||
|
'.[!.]*1') set -- 'no hidden files'
|
||||||
|
esac
|
||||||
|
|
||||||
case $hist in
|
case $hist in
|
||||||
2) # redraw after cmd run
|
2) # redraw after cmd run
|
||||||
shift "$((y > y2 ? y - y2 : 0))"
|
shift "$((y > y2 ? y - y2 : 0))"
|
||||||
@@ -353,6 +358,11 @@ main() {
|
|||||||
/?)
|
/?)
|
||||||
prompt / r
|
prompt / r
|
||||||
set -- "$ans"*
|
set -- "$ans"*
|
||||||
|
|
||||||
|
case $1$# in
|
||||||
|
"$ans*1") set -- 'no results'
|
||||||
|
esac
|
||||||
|
|
||||||
y=1 y2=1 cur=$1 ltype="search $PWD/$ans*"
|
y=1 y2=1 cur=$1 ltype="search $PWD/$ans*"
|
||||||
redraw "$@"
|
redraw "$@"
|
||||||
status_line "$#"
|
status_line "$#"
|
||||||
|
|||||||
Reference in new issue
Block a user