direnv: store cache in ~/.cache
This commit is contained in:
parent
f8ae40ff30
commit
43f992b85a
1 changed files with 12 additions and 1 deletions
|
@ -1 +1,12 @@
|
||||||
source /run/current-system/sw/share/nix-direnv/direnvrc
|
# source /run/current-system/sw/share/nix-direnv/direnvrc
|
||||||
|
|
||||||
|
: "${XDG_CACHE_HOME:="${HOME}/.cache"}"
|
||||||
|
declare -A direnv_layout_dirs
|
||||||
|
direnv_layout_dir() {
|
||||||
|
local hash path
|
||||||
|
echo "${direnv_layout_dirs[$PWD]:=$(
|
||||||
|
hash="$(sha1sum - <<< "$PWD" | head -c40)"
|
||||||
|
path="${PWD//[^a-zA-Z0-9]/-}"
|
||||||
|
echo "${XDG_CACHE_HOME}/direnv/layouts/${hash}${path}"
|
||||||
|
)}"
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue