Fail when files arg is empty, and stop on root

pull/315/head
Hans Larsen 2 years ago
parent cee1edb460
commit ad34c47f09

@ -899,7 +899,8 @@ function __bobthefish_prompt_find_file_up -S -d 'Find file(s), going up the pare
set -l dir "$argv[1]"
set -l files $argv[2..]
if [ -z "$dir" ]
if test -z "$dir"
or test -z "$files"
return 1
end
@ -910,6 +911,9 @@ function __bobthefish_prompt_find_file_up -S -d 'Find file(s), going up the pare
end
end
[ "$dir" = '/' ]
and return 1
set dir (__bobthefish_dirname "$dir")
end
return 1

Loading…
Cancel
Save