mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
__fish_complete_path: guard against non-matching input
This commit is contained in:
parent
f0f21bdecd
commit
f1478137dc
1 changed files with 4 additions and 1 deletions
|
@ -10,5 +10,8 @@ function __fish_complete_path --description "Complete using path"
|
|||
set target "$argv[1]"
|
||||
set description "$argv[2]"
|
||||
end
|
||||
printf "%s\t$description\n" (command ls -dp "$target"*)
|
||||
set -l targets "$target"*
|
||||
if set -q targets[1]
|
||||
printf "%s\t$description\n" (command ls -dp $targets)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue