promote tn to a smarter function
This commit is contained in:
parent
70b49eaa5a
commit
72c9fa386e
3 changed files with 10 additions and 6 deletions
|
@ -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
|
|
9
home/private_dot_config/zsh/functions/tn
Normal file
9
home/private_dot_config/zsh/functions/tn
Normal 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
|
|
@ -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'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue