Skip to content

Commit

Permalink
Store cache files in a user-writable location
Browse files Browse the repository at this point in the history
  • Loading branch information
belak authored and josh-h committed Dec 17, 2018
1 parent d1aa7d4 commit 5955b3b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/fasd/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi
# Initialization
#

cache_file="${0:h}/cache.zsh"
cache_file="${TMPDIR:-/tmp}/prezto-fasd-cache.$UID.zsh"
if [[ "${commands[fasd]}" -nt "$cache_file" || ! -s "$cache_file" ]]; then
# Set the base init arguments.
init_args=(zsh-hook)
Expand Down
2 changes: 1 addition & 1 deletion modules/node/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fi

# Load NPM completion.
if (( $+commands[npm] )); then
cache_file="${0:h}/cache.zsh"
cache_file="${TMPDIR:-/tmp}/prezto-node-cache.$UID.zsh"

if [[ "$commands[npm]" -nt "$cache_file" || ! -s "$cache_file" ]]; then
# npm is slow; cache its output.
Expand Down
2 changes: 1 addition & 1 deletion modules/perl/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fi

if [[ "$OSTYPE" == darwin* ]]; then
# Perl is slow; cache its output.
cache_file="${0:h}/cache.zsh"
cache_file="${TMPDIR:-/tmp}/prezto-perl-cache.$UID.zsh"
perl_path="$HOME/Library/Perl/5.12"

if [[ -f "$perl_path/lib/perl5/local/lib.pm" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion modules/python/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ fi

# Load PIP completion.
if (( $#commands[(i)pip(|[23])] )); then
cache_file="${0:h}/cache.zsh"
cache_file="${TMPDIR:-/tmp}/prezto-python-cache.$UID.zsh"

# Detect and use one available from among 'pip', 'pip2', 'pip3' variants
pip_command="$commands[(i)pip(|[23])]"
Expand Down

0 comments on commit 5955b3b

Please sign in to comment.