feat(zsh): ssh tmux window name

This commit is contained in:
2026-03-16 12:57:23 +00:00
parent 690be51f5c
commit 86e7005fe2
2 changed files with 13 additions and 2 deletions

View File

@@ -4,6 +4,8 @@ if [[ -o interactive ]]; then
fi
fi
bindkey -e
source $ZDOTDIR/setup-history.zsh
source $ZDOTDIR/prompts/simple-two-line.zsh
source $ZDOTDIR/functions.zsh

View File

@@ -36,9 +36,18 @@ alias nvim_update='nvim --headless "+Lazy! sync" +qa'
alias ..="cd .."
function cd()
{
function cd(){
builtin cd "$@" && ls;
}
alias bb="brew bundle --file=~/Brewfile"
function ssh(){
if [ -n "$TMUX" ]; then
tmux rename-window "$(echo "$@" | awk '{print $NF}' | sed 's/.*@//')"
command ssh "$@"
tmux set-window-option automatic-rename on >/dev/null
else
command ssh "$@"
fi
}