小编yon*_*ong的帖子

升级 zsh 后完成停止工作

以前我一直在使用这个方便的脚本oh-my-zsh来设置标签颜色,每当我 ssh 进入机器时:

# iTerm2 window/tab color commands
#   http://code.google.com/p/iterm2/wiki/ProprietaryEscapeCodes
tab-color() {
    echo -ne "\033]6;1;bg;red;brightness;$1\a"
    echo -ne "\033]6;1;bg;green;brightness;$2\a"
    echo -ne "\033]6;1;bg;blue;brightness;$3\a"
}
tab-reset() {
    echo -ne "\033]6;1;bg;*;default\a"
    trap - INT EXIT
}

# Change the color of the tab when using SSH
# reset the color after the connection closes
color-ssh() {
    if [[ -n "$ITERM_SESSION_ID" ]]; then
        trap "tab-reset" INT EXIT
        if [[ "$*" =~ "production|ec2-.*compute-1" ]]; then
            tab-color 255 0 0
        else
            tab-color 144 181 80 …
Run Code Online (Sandbox Code Playgroud)

zsh autocomplete upgrade

7
推荐指数
2
解决办法
3624
查看次数

标签 统计

autocomplete ×1

upgrade ×1

zsh ×1