diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/directories | 6 | ||||
-rwxr-xr-x | etc/functions/xhashd | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/etc/directories b/etc/directories index 3e898f4..0f9e70a 100644 --- a/etc/directories +++ b/etc/directories @@ -1,5 +1,7 @@ ## Named directories ## vim:ft=zsh -hash -d vcs=$HOME/var/svn -hash -d lyrics=~vcs/lyrics +hash -d vcs=~/var/svn +xhashd lyrics=~vcs/lyrics +xhashd www=/var/www +xhashd web=~/public_html 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 +} |