From: Evan Pitstick Date: Fri, 22 Feb 2013 22:14:41 +0000 (-0500) Subject: Moved the grml.org host to skel and added support for ZDOTDIR X-Git-Tag: v0.7.4~1 X-Git-Url: http://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=b10097c077da144719a64b71ffb2c7e673e4b247 Moved the grml.org host to skel and added support for ZDOTDIR --- diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index 712a93a..c540de7 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -131,6 +131,10 @@ fi #zstyle ':completion:*:my-accounts' users-hosts $my_accounts #zstyle ':completion:*:other-accounts' users-hosts $other_accounts +## add grml.org to your list of hosts +#hosts+=(grml.org) +#zstyle ':completion:*:hosts' hosts $hosts + ## telnet on non-default ports? ...well: ## specify specific port/service settings: #telnet_users_hosts_ports=( diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 7b0f7a9..0cff920 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -109,7 +109,7 @@ if [[ $ZSH_PROFILE_RC -gt 0 ]] ; then fi # load .zshrc.pre to give the user the chance to overwrite the defaults -[[ -r ${HOME}/.zshrc.pre ]] && source ${HOME}/.zshrc.pre +[[ -r ${ZDOTDIR:-${HOME}}/.zshrc.pre ]] && source ${ZDOTDIR:-${HOME}}/.zshrc.pre # check for version/system # check for versions (compatibility reasons) @@ -502,7 +502,7 @@ xunfunction() { # modifications in ~/.zshrc.local zrclocal() { xsource "/etc/zsh/zshrc.local" - xsource "${HOME}/.zshrc.local" + xsource "${ZDOTDIR:-${HOME}}/.zshrc.local" return 0 } @@ -1126,17 +1126,17 @@ fi # history -ZSHDIR=$HOME/.zsh +ZSHDIR=${ZDOTDIR:-${HOME}/.zsh} #v# -HISTFILE=$HOME/.zsh_history +HISTFILE=${ZDOTDIR:-${HOME}}/.zsh_history isgrmlcd && HISTSIZE=500 || HISTSIZE=5000 isgrmlcd && SAVEHIST=1000 || SAVEHIST=10000 # useful for setopt append_history # dirstack handling DIRSTACKSIZE=${DIRSTACKSIZE:-20} -DIRSTACKFILE=${DIRSTACKFILE:-${HOME}/.zdirs} +DIRSTACKFILE=${DIRSTACKFILE:-${ZDOTDIR:-${HOME}}/.zdirs} if [[ -f ${DIRSTACKFILE} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then dirstack=( ${(f)"$(< $DIRSTACKFILE)"} ) @@ -1784,7 +1784,6 @@ grmlcomp() { $(hostname) "$_ssh_hosts[@]" "$_etc_hosts[@]" - grml.org localhost ) zstyle ':completion:*:hosts' hosts $hosts