From 8ac8a298687b09a4e8898f3624105a09efdb2b87 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 21 Mar 2009 10:07:07 +0100 Subject: Don't rely on my usual home structure too much --- etc/completion | 2 +- etc/parameters | 13 +++++++++++-- etc/rc | 5 ++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/etc/completion b/etc/completion index 46d9d6e..a96412e 100644 --- a/etc/completion +++ b/etc/completion @@ -2,7 +2,7 @@ zrc_status completion zstyle :compinstall filename ~/.zshrc -zstyle ':completion:*' cache-path ~/var/cache/zsh +zstyle ':completion:*' cache-path $ZCACHEDIR zstyle ':completion:*' use-cache true # Use ls-colors for file completion diff --git a/etc/parameters b/etc/parameters index 13e05c5..95d22d4 100644 --- a/etc/parameters +++ b/etc/parameters @@ -2,8 +2,17 @@ ## parameters which are only important for interactive shells. ## For application-related parameters, see zshenv +# zsh cache directory +if [[ -d ~/var/cache/zsh ]] { + ZCACHEDIR=~/var/cache/zsh +} else { + zrc_info "~/var/cache/zsh does not exist, using ~/.zsh-cache instead" + mkdir -p ~/.zsh-cache + ZCACHEDIR=~/.zsh-cache +} + # There's no point in having more history than what can be saved on disk -HISTFILE=~/var/cache/zsh/history +HISTFILE=$ZCACHEDIR/history HISTSIZE=50000 SAVEHIST=$HISTSIZE @@ -17,7 +26,7 @@ LISTMAX=0 TIMEFMT='%J (%P) - %*E real, %*U user, %*S system' # completion cache for compinit -compdump=~/var/cache/zsh/compdump +compdump=$ZCACHEDIR/compdump # Add my own executables, if they're not already in the path [[ $path[1] = $HOME/bin ]] || export PATH=$HOME/bin:$PATH diff --git a/etc/rc b/etc/rc index 6a64209..8b62217 100644 --- a/etc/rc +++ b/etc/rc @@ -17,6 +17,9 @@ if [[ $system == linux ]] { function zrc_status { echo -n "\r\e[2K${info}--${reset} $*" } +function zrc_info { + echo "${info}--${reset} $*" +} # include the actual config source $ZDIR/options @@ -47,7 +50,7 @@ chpwd echo -n "\r\e[2K" unalias 'linux:' unalias 'openbsd:' -unfunction zrc_status +unfunction zrc_status zrc_info unfunction xexport xsource unset system distro unset ps_fail ps_green ps_info ps_red ps_reset ps_yellow -- cgit v1.2.3