Update tat script to accept optional session name
If no session name is provided, it will generate one from the current directory.
This commit is contained in:
parent
0ee272928f
commit
d68ba14669
1 changed files with 2 additions and 1 deletions
3
bin/tat
3
bin/tat
|
@ -2,7 +2,8 @@
|
|||
#
|
||||
# Attach or create tmux session named the same as current directory.
|
||||
|
||||
session_name="$(basename "$PWD" | tr . -)"
|
||||
path_name="$(basename "$PWD" | tr . -)"
|
||||
session_name=${1-$path_name}
|
||||
|
||||
not_in_tmux() {
|
||||
[ -z "$TMUX" ]
|
||||
|
|
Loading…
Add table
Reference in a new issue