diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index ec9b43f..4549b63 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -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