setopt share_history
function _we_are_in_gnu_screen () {
- [ "$WINDOW" != "" ]
+ [[ "$WINDOW" != "" ]]
}
_prompt_base='%B[%n@%m] %{%(?.$fg[green].$fg[red])%}%#%{$reset_color%}%b '
function preexec() { # Hook
if { _we_are_in_gnu_screen } then
# Set the window title of GNU Screen.
- local cmd=${1[(wr)^(*=*|sudo|nice|env|time|-*|[0-9]*)]}
+ local cmd=${1[(wr)^(*=*|sudo|nice|env|time|ssh|-*|[0-9]*)]}
printf "\ek$cmd\e\\"
fi
}