2
0
Fork 0
mirror of https://github.com/fish-shell/fish-shell synced 2025-01-20 08:54:00 +00:00

Restore directory completions for subcommands

Fixes 

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:
Johannes Altmanninger 2020-03-24 20:10:08 +01:00
parent 26c51817f2
commit aa304cbd3d
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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