Skip to content

Direnv does not work if shell initializes tmux #29851

Answered by musjj
musjj asked this question in General Q&A
Discussion options

You must be logged in to vote

Figured out a good solution, you can check if the shell is connected to a terminal before executing tmux:

if tty -s; then
  exec tmux new-session -A -s "$USER"
fi

This way tmux will still load in zed's terminal pane.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by musjj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant