2000-04-11 09:57:56 +02:00
|
|
|
#compdef hash
|
1999-04-15 20:05:38 +02:00
|
|
|
|
2000-04-11 09:57:56 +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
|
2000-04-11 09:57:56 +02:00
|
|
|
_wanted -C -d named-directories expl 'named directory' \
|
|
|
|
compadd -q -S '=' - "${(@k)nameddirs}"
|
1999-04-15 20:05:38 +02:00
|
|
|
fi
|
2000-04-11 09:57:56 +02:00
|
|
|
elif compset -P 1 '*='; then
|
|
|
|
_wanted -C value values expl 'executable file' _files "$expl[@]" -g '*(-*)'
|
1999-04-15 20:05:38 +02:00
|
|
|
else
|
2000-04-11 09:57:56 +02:00
|
|
|
_wanted -C name commands expl command compadd -q -S '=' - "${(@k)commands}"
|
1999-04-15 20:05:38 +02:00
|
|
|
fi
|