diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/bash.nix | 13 | 
1 files changed, 6 insertions, 7 deletions
| diff --git a/config/bash.nix b/config/bash.nix index 506c40a..56adf63 100644 --- a/config/bash.nix +++ b/config/bash.nix @@ -16,15 +16,14 @@          if [ -n "$DIR" ]          then            if [ -f "$DIR/flake.nix" ]; then -            cd "$DIR" || exit +            cd $DIR || exit              nix develop +          fi +          tmux new-session -d -c "$DIR" -s "$SESSION_NAME" +          if [ -n "$TMUX" ]; then +            tmux switch -t "$SESSION_NAME"            else -            tmux new-session -d -c "$DIR" -s "$SESSION_NAME" -            if [ -n "$TMUX" ]; then -              tmux switch -t "$SESSION_NAME" -            else -              tmux attach -t "$SESSION_NAME" -            fi +            tmux attach -t "$SESSION_NAME"            fi          fi        } | 
