From 7378e260a8ec1757905942f9cb7031ddbc16cc47 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 6 Dec 2017 13:56:31 -0500 Subject: [PATCH] Fix zgen init+install (ZGEN_DIR=>ZGEN_SOURCE) & reformat zshrc --- shell/zsh/.zshenv | 2 +- shell/zsh/.zshrc | 24 ++++++++++++------------ shell/zsh/_init | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/shell/zsh/.zshenv b/shell/zsh/.zshenv index 656f93ba..a02d8b5a 100644 --- a/shell/zsh/.zshenv +++ b/shell/zsh/.zshenv @@ -3,7 +3,7 @@ source $(cd ${${(%):-%x}:A:h}/../.. && pwd -P)/env # Move ZDOTDIR from $HOME to reduce dotfile pollution. export ZDOTDIR="$XDG_CONFIG_HOME/zsh" -export ZGEN_DIR="$XDG_CACHE_HOME/zgen" +export ZGEN_SOURCE="$XDG_CACHE_HOME/zgen" # paths typeset -gU cdpath fpath mailpath path diff --git a/shell/zsh/.zshrc b/shell/zsh/.zshrc index d73858a8..93b7dc30 100644 --- a/shell/zsh/.zshrc +++ b/shell/zsh/.zshrc @@ -1,22 +1,22 @@ export ZGEN_AUTOLOAD_COMPINIT=0 AUTOPAIR_INHIBIT_INIT=1 -_load_repo tarjoilija/zgen $ZGEN_DIR zgen.zsh +_load_repo tarjoilija/zgen $ZGEN_SOURCE zgen.zsh if ! zgen saved; then - echo "Creating zgen save" - .cache-clear + echo "Creating zgen save" + _cache_clear - zgen load hlissner/zsh-autopair autopair.zsh - zgen load zsh-users/zsh-history-substring-search - zgen load zdharma/history-search-multi-word - zgen load zsh-users/zsh-completions src - zgen load junegunn/fzf shell # completions + zgen load hlissner/zsh-autopair autopair.zsh develop + zgen load zsh-users/zsh-history-substring-search + zgen load zdharma/history-search-multi-word + zgen load zsh-users/zsh-completions src + zgen load junegunn/fzf shell # completions - if [[ -z $SSH_CONNECTION ]]; then - zgen load zdharma/fast-syntax-highlighting - fi + if [[ -z $SSH_CONNECTION ]]; then + zgen load zdharma/fast-syntax-highlighting + fi - zgen save + zgen save fi diff --git a/shell/zsh/_init b/shell/zsh/_init index b7b5e583..e4da0523 100755 --- a/shell/zsh/_init +++ b/shell/zsh/_init @@ -19,8 +19,8 @@ install() { } update() { - if [[ -e $ZGEN_DIR/zgen.zsh ]]; then - source $ZGEN_DIR/zgen.zsh + if [[ -e $ZGEN_SOURCE/zgen.zsh ]]; then + source $ZGEN_SOURCE/zgen.zsh zgen selfupdate zgen update fi