From cd81d62524d307ed451d3fc20d44dae2d8b46d01 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 26 Mar 2009 14:37:15 +0100 Subject: use xhashd to only hash directories if they exist --- etc/functions/xhashd | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 etc/functions/xhashd (limited to 'etc/functions/xhashd') diff --git a/etc/functions/xhashd b/etc/functions/xhashd new file mode 100755 index 0000000..2909ea7 --- /dev/null +++ b/etc/functions/xhashd @@ -0,0 +1,7 @@ +## vim:ft=zsh +## hash a directory if it exists +typeset directory=${~1#*\=} name=${1%%\=*} + +if [[ -d $directory ]] { + hash -d $name=$directory +} -- cgit v1.2.3