Added support for "(ssh user@host)" when logged in via ssh.

This commit is contained in:
Ole Morten Halvorsen 2012-08-20 08:11:43 +10:00
commit 99b3eb5211

View file

@ -1,4 +1,11 @@
PROMPT='%{$FG[238]%}%3~ \
function ssh_connection() {
if [[ -n $SSH_CONNECTION ]]; then
echo "%{$fg_bold[red]%}(ssh %n@%m) "
fi
}
PROMPT='$(ssh_connection)\
%{$FG[238]%}%3~ \
$(git_prompt_info)\
%{$fg[green]%}%(!.#.)\
%{$reset_color%} '