diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Unix/Type/_path_commands | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Completion/Unix/Type/_path_commands b/Completion/Unix/Type/_path_commands index 393c0c67e..22d2aaeba 100644 --- a/Completion/Unix/Type/_path_commands +++ b/Completion/Unix/Type/_path_commands @@ -82,6 +82,18 @@ if [[ -n $need_desc ]]; then else _wanted commands expl 'external command' compadd "$@" -k commands && ret=0 fi +if [[ -o path_dirs ]]; then + local -a path_dirs + path_dirs=(${^path}/*(/N:t)) + (( ${#path_dirs} )) && + _wanted path-dirs expl 'directory in path' compadd "$@" -a path_dirs && ret=0 + + if [[ $PREFIX$SUFFIX = */* ]]; then + # Find command from path, not hashed + _wanted commands expl 'external command' _path_files -W path -g '*(*)' && + ret=0 + fi +fi return $ret } |