feat(zsh): ssh tmux window name
This commit is contained in:
@@ -4,6 +4,8 @@ if [[ -o interactive ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
bindkey -e
|
||||||
|
|
||||||
source $ZDOTDIR/setup-history.zsh
|
source $ZDOTDIR/setup-history.zsh
|
||||||
source $ZDOTDIR/prompts/simple-two-line.zsh
|
source $ZDOTDIR/prompts/simple-two-line.zsh
|
||||||
source $ZDOTDIR/functions.zsh
|
source $ZDOTDIR/functions.zsh
|
||||||
|
|||||||
@@ -36,9 +36,18 @@ alias nvim_update='nvim --headless "+Lazy! sync" +qa'
|
|||||||
|
|
||||||
alias ..="cd .."
|
alias ..="cd .."
|
||||||
|
|
||||||
function cd()
|
function cd(){
|
||||||
{
|
|
||||||
builtin cd "$@" && ls;
|
builtin cd "$@" && ls;
|
||||||
}
|
}
|
||||||
|
|
||||||
alias bb="brew bundle --file=~/Brewfile"
|
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
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user