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