Jonas Chevalier

Results 831 comments of Jonas Chevalier

yeah I don't know if I can be of any more help

I should probably explain the problem better. The core issue is that PS1 is a local variable. If it gets set by direnv on load, it wouldn't know how to...

The issue is how to backup and restore the local PS1 variable. There would need to be a dedicated mechanism for that.

Usually PS1, PS2, ... are variables. There is no need to export them to the process environment for bash to pick them up.

that's right. The .envrc is evaluated in a bash sub-shell and only environment variables are re-exported to the target shell. This is the only way to make direnv cross-shell compatible....

> I strongly believe in the Unix tool philosophy Agreed! the stdlib is already too wide for my taste so I added `source_url` for people to extend direnv. In the...

that's weird, PWD should always point to the directory containing the .envrc.

```console $ mkdir -p foo/bar $ echo 'echo $PWD' > foo/.envrc $ direnv allow foo/ $ cd foo/bar/ direnv: loading ~/foo/.envrc /home/zimbatm/foo ```

hmm indeed. Try setting the function instead then: ```sh : ${XDG_CACHE_HOME:=$HOME/.cache} direnv_layout_dir() { local pwd_hash pwd_hash=$(basename "$PWD")-$(echo -n "$PWD" | shasum | cut -d ' ' -f 1 | head...