1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-07 09:21:18 +02:00
zsh/Completion/Builtins/_hash
1999-11-16 09:19:32 +00:00

18 lines
501 B
Text

#compdef hash
local expl
if [[ "$words[2]" = -*d* ]]; then
if compset -P 1 '*\='; then
_wanted -C -d-value files && _path_files -g '*(-/)'
else
_wanted -C -d named-directories expl 'named directory' &&
compadd "$expl[@]" -q -S '=' - "${(@k)nameddirs}"
fi
elif compset -P 1 '*\='; then
_wanted -C value values expl 'executable file' &&
_files "$expl[@]" -g '*(*)'
else
_wanted -C name commands expl command &&
compadd "$expl[@]" -q -S '=' - "${(@k)commands}"
fi