diff options
| author | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2021-12-14 15:33:32 +0000 |
|---|---|---|
| committer | LMBishop <13875753+LMBishop@users.noreply.github.com> | 2021-12-14 15:33:32 +0000 |
| commit | b61c8715cf8f6154e2e4ed6aecdc12ff2c91d461 (patch) | |
| tree | 7ae4e168d2a936e5a5ebcb32f7f235a5342c1693 /zsh | |
| parent | a8eccf74df77f9004a6e4ee09daad73c9e30912d (diff) | |
Add oh-my-zsh scripts
Diffstat (limited to 'zsh')
| -rw-r--r-- | zsh/oh-my-zsh/iTerm2-ssh.zsh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/zsh/oh-my-zsh/iTerm2-ssh.zsh b/zsh/oh-my-zsh/iTerm2-ssh.zsh new file mode 100644 index 0000000..6f19818 --- /dev/null +++ b/zsh/oh-my-zsh/iTerm2-ssh.zsh @@ -0,0 +1,28 @@ +function tabc() { + NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi + echo -e "\033]50;SetProfile=$NAME\a" +} + +function tab-reset() { + NAME="Default" + echo -e "\033]50;SetProfile=$NAME\a" +} + +function colorssh() { + if [[ -n "$ITERM_SESSION_ID" ]]; then + trap "tab-reset" INT EXIT + if [[ "$*" =~ "ceres" ]]; then + tabc "SSH - Ceres" + elif [[ "$*" =~ "ug04" || "$*" =~ "tw" ]]; then + tabc "SSH - SoCS" + else + tabc "SSH - Unknown" + fi +# tabc SSH + fi + ssh $* +} +compdef _ssh tabc=ssh + +alias ssh="colorssh" + |
