1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-20 14:04:03 +01:00
zsh/Completion/Builtins/_hash

17 lines
465 B
Plaintext
Raw Normal View History

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