mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-14 17:07:44 +00:00
Restore directory completions for subcommands
Fixes #6798 This re-adds some false positives: functions, builtins and abbreviations are suggested after commands like sudo but I don't think anyone had complained about that.
This commit is contained in:
parent
26c51817f2
commit
aa304cbd3d
2 changed files with 2 additions and 2 deletions
|
@ -1,3 +1,3 @@
|
|||
function __fish_complete_external_command
|
||||
command find $PATH/ -maxdepth 1 -perm -u+x 2>&- | string match -r '[^/]*$'
|
||||
complete -C "$argv[1]"
|
||||
end
|
||||
|
|
|
@ -49,7 +49,7 @@ function __fish_complete_subcommand -d "Complete subcommand" --no-scope-shadowin
|
|||
end
|
||||
|
||||
if test $allow_functions_and_builtins = false && test (count $subcommand) -eq 1
|
||||
__fish_complete_external_command
|
||||
__fish_complete_external_command "$subcommand"
|
||||
else
|
||||
printf "%s\n" (complete -C "$subcommand")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue