We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
It is recommended to wrap tmux to avoid issues with environment loading.
In Bash / ZSH:
alias tmux='direnv exec / tmux'
In Fish:
alias tmux "direnv exec / tmux"
This will make sure that direnv is unloaded before executing tmux, and avoid issues with environment variables mangling in tmux's subshells.
NOTE: this solution will not revert to the original environment if a direnv-managed folder was entered before invoking tmux.
tmux
Rather than aliasing tmux, you can try adding these lines to .tmux.conf or /etc/tmux.conf:
.tmux.conf
/etc/tmux.conf
set-option -g update-environment "DIRENV_DIFF DIRENV_DIR DIRENV_WATCHES" set-environment -gu DIRENV_DIFF set-environment -gu DIRENV_DIR set-environment -gu DIRENV_WATCHES set-environment -gu DIRENV_LAYOUT