summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2024-05-22 18:05:48 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2024-05-22 18:05:48 +0530
commit3ec4d373c60491567b067504b5aac4d087b05d23 (patch)
tree9ffbbd9e70ba1f833bf3af2c77d94e89a0fd3f4d /config
parent610524402ca8edb6ed81c57cfcb6fa2db77e39a2 (diff)
update
Diffstat (limited to 'config')
-rw-r--r--config/bash.nix13
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
}