Jonas Chevalier
Jonas Chevalier
Here is a new hook that replaces `eval "$(direnv hook bash)", for example: ```sh _direnv_hook() { local previous_exit_status=$? line; trap -- '' SIGINT; while IFS= read -d '' -r line;...
Same for zsh: ```sh _direnv_hook() { trap -- '' SIGINT; local line; while IFS= read -d '' -r line; do if [[ "$line" = *"="* ]]; then echo export "$line";...
You could write a little `direnv-switch` wrapper function like this: ```sh #!/usr/bin/env bash # Usage: direnv-switch set -euo pipefail # take the env as the first argument env_name=$1 env_file=.env.${env_name} #...
I think a better approach would be for the user to be able to maintain an out-of-tree `.envrc`. Let's say under `~/.config/direnv/private//.envrc`. That way we don't have the security issue...
If I could go back in a time-machine I would also tell myself to name the `.envrc` files `.env.sh` or `direnv.sh`
Good questions! * `direnv edit` would gain a `--private` flag that would do it for you * each sourced file is displayed as part of the loading output so it...
Some more aspects related to this design idea that I have: I imagine that the private envrc would take precedence over the per-folder `.envrc` file. Meaning that if a file...
After the auto-dotenv debacle, where I had to revert the feature because it was breaking existing workflows, it's unlikely I will change direnv to automatically load `.envrc.local`. It would have...
What I usually do if I want to disable direnv in a single bash shell (for testing): `cd / && unset PROMPT_COMMAND && eval "$(direnv export bash)" && cd -`....
@todd-a-jacobs For fish, I think it's: ``` functions --erase __direnv_export_eval && functions --erase __direnv_export_eval_2 ``` Both for the bash and fish solution, the commands are entered in the current shell....