ohmyzsh/lib/H_alias_path.zsh
ran9er f067e49ebb 位于分支 ran9er
新文件:       H_alias_cmd.zsh
	新文件:       H_alias_path.zsh
	新文件:       H_eval.zsh
	新文件:       H_helper.zsh
	新文件:       H_keys.zsh
2014-08-20 13:03:35 +08:00

15 lines
469 B
Bash

function exist-path () {
for p in $* ; do
[[ -e $p ]] && echo $p && return;
done
}
######
hash -d WWW=$(exist-path /home/lighttpd/html ~/ROR/)
hash -d MNT=$(exist-path /{mnt,media}/$USER /{mnt,media})
hash -d PKG=$(exist-path /var/cache/{pacman/pkg,apt/archives})
hash -d E="/etc/env.d"
hash -d C="/etc/conf.d"
hash -d I=$(exist-path /etc/{init.d,rc.d})
hash -d X="/etc/X11"
hash -d BK=$(exist-path /home/$USER/{config_bak,iff})
hash -d HIST="$HISTDIR"