#compdef unhash local fl="$words[2]" ret=1 expl if [[ "$fl" = -*d* ]]; then _description expl 'named directory' compadd "$expl[@]" - "${(@k)nameddirs}" && ret=0 fi if [[ "$fl" = -*a* ]]; then _description expl alias compadd "$expl[@]" - "${(@k)aliases}" "${(@k)disaliases}" && ret=0 fi if [[ "$fl" = -*f* ]]; then _description expl 'shell function' compadd "$expl[@]" - "${(@k)functions}" "${(@k)disfunctions}" && ret=0 fi if [[ "$fl" != -* ]]; then _command_names -e && ret=0 fi return ret