Tmux session work

This commit is contained in:
Daniel Flanagan 2021-12-23 12:20:59 -06:00
parent f3a90e4c26
commit 0cc35f6720
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
2 changed files with 4 additions and 6 deletions

View file

@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
N _scratch tmux-lyte-session notes $NOTES_DIR -- fish -C "N _scratch"

View file

@ -1,8 +1,6 @@
#!/usr/bin/env fish #!/usr/bin/env fish
set session_name $argv[1] set session_name $argv[1]
set dir (set -q argv[2] && echo $argv[2] || pwd)
set d (set -q $argv[2] && echo $argv2 || pwd) tmux new-session -D -s "$session_name" -c "$dir" $argv[3..-1] || \
tmux attach-session -d -t "$session_name" -c "$dir"
tmux new-session -D -s "$session_name" -c "$d" || \
tmux attach-session -d -t "$session_name" -c "$d"