1
0
mirror of https://github.com/bertptrs/vimconfig.git synced 2025-12-25 20:40:32 +01:00

Better highlight failures and SSH.

This commit is contained in:
2019-04-11 13:54:32 +02:00
parent cb31c5e655
commit 7671e4ab37

View File

@@ -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=(