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