feat: Add direnv module and add configuration
This commit is contained in:
parent
fe6e4f4c0b
commit
7846b4e745
3 changed files with 32 additions and 4 deletions
10
home/modules/programs/direnv/direnvrc.sh
Normal file
10
home/modules/programs/direnv/direnvrc.sh
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
: "${XDG_CACHE_HOME:=$HOME/.cache}"
|
||||
declare -A direnv_layout_dirs
|
||||
function 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