Fix tmux window naming when SSHing and fix Darwin/arm64 completions loading.

This commit is contained in:
2022-02-14 23:10:34 +05:00
parent f4bf8402b2
commit f62e3c95c6
2 changed files with 9 additions and 4 deletions

View File

@@ -2,9 +2,9 @@
# and modified to set also "ssh" prefix.
ssh() {
if [ -n "$TMUX" ]; then
tmux -2u rename-window "ssh $(echo $* | rev | cut -d '@' -f1 | rev)";
command ssh "$@";
tmux -2u set-window-option automatic-rename "on" > /dev/null;
tmux -2u rename-window "ssh $(echo $* | rev | cut -d '@' -f1 | rev)"
command ssh "$@"
tmux -2u set-window-option automatic-rename "on" > /dev/null
else
command ssh "$@";
fi