From 647826c71103ea03f83d011462d087c111a3cc3d Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Tue, 8 Jun 2010 10:56:38 -0700 Subject: [PATCH] have better support for zsh on NFS wrt Macs --- zsh/completion | 2 +- zshrc | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/zsh/completion b/zsh/completion index 5ee5aa5..6c3e0b8 100755 --- a/zsh/completion +++ b/zsh/completion @@ -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%}' diff --git a/zshrc b/zshrc index 637aad4..f120a9c 100644 --- a/zshrc +++ b/zshrc @@ -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