summaryrefslogtreecommitdiff
path: root/etc/functions/xhashd
blob: 2909ea7a6e396d2d4612147897f0c761ab89d8d9 (plain)
1
2
3
4
5
6
7
## vim:ft=zsh
## hash a directory if it exists
typeset directory=${~1#*\=} name=${1%%\=*}

if [[ -d $directory ]] {
	hash -d $name=$directory
}