Added additional ssh identifier for the right statusbar.

This commit is contained in:
Christian Rebischke
2017-02-10 17:12:05 +01:00
parent 15cbe8dbc9
commit 7e25fa1e93
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -670,6 +670,13 @@ prompt_history() {
"$1_prompt_segment" "$0" "$2" "244" "$DEFAULT_COLOR" '%h'
}
prompt_detect_ssh(){
local color="yellow"
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
"$1_prompt_segment" "$0" "$2" "$DEFAULT_COLOR" "$color" "ssh"
fi
}
# Detection for virtualization (systemd based systems only)
prompt_detect_virt() {
if ! command -v systemd-detect-virt;then