Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (17 sloc) 655 Bytes
# Decorate terminal color based on the server name
# Run Python script on the shell start-uo and generate the server
# specific VT100 OSC control code for setting the tab colour
TAB_DECORATOR="$( 0.7 0.4)"
# Activate the decoration now when the shell is started.
# Note that we need to re-activate this on preexit() hook because we might SSH into another box
# from this computer and then we need to restore the color of this server
if [[ "$LC_TERM_PROGRAM" == "" ]]
function tab_color_precmd {
echo -n "$TAB_DECORATOR"
autoload -U add-zsh-hook
add-zsh-hook precmd tab_color_precmd