have better support for zsh on NFS wrt Macs

This commit is contained in:
David Majnemer 2010-06-08 10:56:38 -07:00
parent 4966613ae1
commit 647826c711
2 changed files with 11 additions and 2 deletions

View file

@ -26,7 +26,7 @@ zstyle -e ':completion:*' users "reply=( root '${USERNAME}' )"
# caching good
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path "${HOME}/.zsh/.zcompcache-${HOST}"
zstyle ':completion:*' cache-path "${HOME}/.zsh/.zcompcache-${LHOSTNAME}"
# descriptions
zstyle ':completion:*:messages' format $'%{\e[01;35m%} -- %d -- %{\e[00;00m%}'

11
zshrc
View file

@ -3,7 +3,16 @@
# Trivial modifications: David Majnemer
# vim:set nowrap:
autoload compinit; compinit -d "${HOME}/.zsh/.zcompdump-${HOST}"
case `uname -s` in
Darwin)
export LHOSTNAME=`scutil --get LocalHostName`
;;
*)
export LHOSTNAME=${HOST}
;;
esac
autoload compinit; compinit -d "${HOME}/.zsh/.zcompdump-${LHOSTNAME}"
autoload age
autoload zmv