From 3ec4d373c60491567b067504b5aac4d087b05d23 Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Wed, 22 May 2024 18:05:48 +0530 Subject: update --- config/bash.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'config/bash.nix') 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 } -- cgit v1.2.3