mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
Skip unusable paths in __fish_print_hostnames
See https://github.com/fish-shell/fish-shell/issues/4511#issuecomment-343022740. This would try to `cd` to ~/.ssh even if it didn't exist. That's clearly bogus.
This commit is contained in:
parent
8fb6d5db3b
commit
4ca9953114
1 changed files with 4 additions and 0 deletions
|
@ -62,6 +62,10 @@ function __fish_print_hostnames -d "Print a list of known hostnames"
|
|||
end
|
||||
end
|
||||
|
||||
# Skip unusable paths.
|
||||
test -d "$relative_path" -a -x "$relative_path"
|
||||
or return
|
||||
|
||||
builtin cd $relative_path
|
||||
set -l new_paths
|
||||
for path in $paths
|
||||
|
|
Loading…
Reference in a new issue