Skip to content

Commit

Permalink
define ZSH_CACHE_DIR; some ohmyzsh plugins use it; see #42
Browse files Browse the repository at this point in the history
  • Loading branch information
romkatv committed Jul 16, 2020
1 parent 54042a4 commit 08fcda0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions main.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ path=($Z4H/fzf/bin $path)
fpath+=($Z4H/zsh4humans/fn $Z4H/zsh-completions/src)

: ${GITSTATUS_CACHE_DIR=$Z4H/cache/gitstatus}
: ${ZSH_CACHE_DIR=$Z4H/cache/ohmyzsh}

autoload -Uz -- $Z4H/zsh4humans/fn/[^_]*(:t) || return

Expand Down
12 changes: 6 additions & 6 deletions sc/setup
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ if [ -z "$new" ]; then
exit 1
fi

command mkdir -p -- "$new"/bin "$new"/fn "$new"/cache "$new"/tmp || exit
command mkdir -p -- "$new"/bin "$new"/fn "$new"/cache/ohmyzsh "$new"/tmp || exit
if [ ! -L "$new"/z4h.zsh ]; then
command cp -f -- "$self"/../z4h.zsh "$new"/ || exit
command cp -f -- "$self"/../z4h.zsh "$new"/ || exit
fi
if [ ! -e "$new"/cache/last-update-ts ]; then
echo -n >"$new"/cache/last-update-ts || exit
echo -n >"$new"/cache/last-update-ts || exit
fi

if [ -n "$old" -a -d "$old"/stickycache ]; then
command rm -rf -- "$new"/stickycache || exit
command cp -r -- "$old"/stickycache "$new"/stickycache || exit
command rm -rf -- "$new"/stickycache || exit
command cp -r -- "$old"/stickycache "$new"/stickycache || exit
else
command mkdir -p -- "$new"/stickycache || exit
command mkdir -p -- "$new"/stickycache || exit
fi

0 comments on commit 08fcda0

Please sign in to comment.