Skip to content

Commit

Permalink
Fix znap eval dir handling
Browse files Browse the repository at this point in the history
Fixes #244.
  • Loading branch information
marlonrichert committed May 19, 2023
1 parent 513742f commit 7494355
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions functions/.znap.eval
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ if [[ $1 == */* ]]; then
.znap.clone $1 ||
return
private _P__repo=~[$1]
private _P__name=${_P__repo#$gitdir}
private _P__name=${_P__repo#$gitdir/}
else
local _P__name=$1 _P__repo=
fi
private _P__cmd=$2

private _P__cache_dir=$XDG_CACHE_HOME/zsh-snap/eval
zf_mkdir -pm 0700 $_P__cache_dir
private _P__cache_file=$_P__cache_dir/${_P__name}.zsh
private _P__cache_dir=
private _P__cache_file=$XDG_CACHE_HOME/zsh-snap/eval/${_P__name}.zsh
zf_mkdir -pm 0700 $_P__cache_file:h

[[ -r $_P__cache_file ]] ||
print -r "znap eval: generating cache for ${(q+)_P__cmd}"
Expand Down

0 comments on commit 7494355

Please sign in to comment.