From 7671e4ab372c6cfb10b9bf9f608a2046435c5d98 Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Thu, 11 Apr 2019 13:54:32 +0200 Subject: [PATCH] Better highlight failures and SSH. --- zsh/.config/zsh/.zshtheme | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/zsh/.config/zsh/.zshtheme b/zsh/.config/zsh/.zshtheme index bd65586..af73ab1 100644 --- a/zsh/.config/zsh/.zshtheme +++ b/zsh/.config/zsh/.zshtheme @@ -28,8 +28,13 @@ function prompt_handle_virtualenv() { function prompt_ps1() { local ps1 rs='%b%f%k' local dir="%{$fg[%~]%}%8~$rs" - local hist="%{$fg[blue]%}[\$(prompt_last_cmd)]$rs " - local host="%{$fg[red]%}%m " + local hist="%(?.%{$fg[blue]%}.%{$bg[blue]%}%{$fg[black]%})[\$(prompt_last_cmd)]$rs " + local host + if [[ -n SSH_TTY ]]; then + host="%{$bg[red]%}%{$fg_bold[black]%}%m$rs " + else + host="%{$fg[red]%}%m$rs " + fi local prompt="%n@%{$fg[cyan]%}%m$rs %# " ps1=(