mirror of
https://github.com/neoromantique/dotfiles.git
synced 2026-03-13 21:53:20 +03:00
put ssh host as window name in tmux
This commit is contained in:
3
.zshrc
3
.zshrc
@@ -47,7 +47,8 @@ function fzf-ssh () {
|
||||
local selected_host=$(grep "Host " ~/.ssh/config | grep -v '*' | cut -b 6- | fzf --query "$LBUFFER" --prompt="SSH Remote > ")
|
||||
|
||||
if [ -n "$selected_host" ]; then
|
||||
BUFFER="ssh ${selected_host}"
|
||||
tmux rename-window "Remote -- $selected_host"
|
||||
BUFFER="ssh ${selected_host} ; tmux rename-window dc"
|
||||
zle accept-line
|
||||
fi
|
||||
zle reset-prompt
|
||||
|
||||
Reference in New Issue
Block a user