mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2025-06-13 13:03:54 +00:00
Fail when files arg is empty, and stop on root
This commit is contained in:
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 dir "$argv[1]"
|
||||||
set -l files $argv[2..]
|
set -l files $argv[2..]
|
||||||
|
|
||||||
if [ -z "$dir" ]
|
if test -z "$dir"
|
||||||
|
or test -z "$files"
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -910,6 +911,9 @@ function __bobthefish_prompt_find_file_up -S -d 'Find file(s), going up the pare
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
[ "$dir" = '/' ]
|
||||||
|
and return 1
|
||||||
|
|
||||||
set dir (__bobthefish_dirname "$dir")
|
set dir (__bobthefish_dirname "$dir")
|
||||||
end
|
end
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user