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

Fix typo and better coloring.

This commit is contained in:
2019-04-11 14:13:56 +02:00
parent 7671e4ab37
commit 4b72b16e49

View File

@@ -21,19 +21,18 @@ function prompt_last_cmd() {
function prompt_handle_virtualenv() { function prompt_handle_virtualenv() {
if [[ -n $VIRTUAL_ENV ]]; then if [[ -n $VIRTUAL_ENV ]]; then
echo "%{$fg_bold[green]%}$PROMPT_VENV_INDICATOR $(basename $VIRTUAL_ENV)%b%f%k " echo "%{$fg_bold[green]%}%S$PROMPT_VENV_INDICATOR%s $(basename $VIRTUAL_ENV)%b%f%k "
fi fi
} }
function prompt_ps1() { function prompt_ps1() {
local ps1 rs='%b%f%k' local ps1 rs='%b%f%k%s'
local dir="%{$fg[%~]%}%8~$rs" local dir="%{$fg[%~]%}%8~$rs"
local hist="%(?.%{$fg[blue]%}.%{$bg[blue]%}%{$fg[black]%})[\$(prompt_last_cmd)]$rs " local hist="%{$fg[blue]%}%(?..%S)[\$(prompt_last_cmd)]$rs "
local host local host="%{$fg[red]%}%m$rs "
if [[ -n SSH_TTY ]]; then # Highlight the hostname if we are connected over SSH
host="%{$bg[red]%}%{$fg_bold[black]%}%m$rs " if [[ -n $SSH_TTY ]]; then
else host="%S%B$host"
host="%{$fg[red]%}%m$rs "
fi fi
local prompt="%n@%{$fg[cyan]%}%m$rs %# " local prompt="%n@%{$fg[cyan]%}%m$rs %# "