mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-22 03:51:15 -03: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user