summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-03-21 10:07:07 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-03-21 10:07:07 +0100
commit8ac8a298687b09a4e8898f3624105a09efdb2b87 (patch)
tree12a7bfec8c422f7f8fbfd25aa1afd5dfd7524eae
parent64d57d6397a488b11d448e437a8661194a9d7d43 (diff)
Don't rely on my usual home structure too much
-rw-r--r--etc/completion2
-rw-r--r--etc/parameters13
-rw-r--r--etc/rc5
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