promote tn to a smarter function

This commit is contained in:
Daylin Morgan 2023-04-24 13:36:00 -05:00
parent 70b49eaa5a
commit 72c9fa386e
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F
3 changed files with 10 additions and 6 deletions

View file

@ -1,5 +0,0 @@
# function pmodload {
# if you are using Prezto, you'll need an empty pmodload function
# }
# vim: ft=zsh sw=2 ts=2 et

View file

@ -0,0 +1,9 @@
#!/usr/bin/env zsh
##? create a new tmux session
##? use current directory name as a fallback
if [ -z "$1" ]; then
tmux new-session -s "${PWD:A:t2}"
else
tmux new-session -s "$1"
fi

View file

@ -3,6 +3,6 @@ alias t-labbook="$DOTFILES_DIR/tmux/labbook.sh"
alias tmux="tmux -f $HOME/.config/tmux/tmux.conf" alias tmux="tmux -f $HOME/.config/tmux/tmux.conf"
alias t='tmux' alias t='tmux'
alias ta='tmux attach -t' alias ta='tmux attach -t'
alias tn='tmux new-session -s' # alias tn='tmux new-session -s'
alias tl='tmux list-sessions' alias tl='tmux list-sessions'