base prompt now supports 256 and 24 bit color
This commit is contained in:
@@ -2,7 +2,20 @@
|
||||
# RPROMPT="%(?..%{$fg[red]%}%? )$RPROMPT"
|
||||
|
||||
function prompt_userathost () {
|
||||
print "%{$fg_bold[cyan]%}%n%{$fg_bold[white]%}@%{$fg_bold[magenta]%}%m %{$fg_bold[white]%}%~"
|
||||
if [[ $colorcount -gt 256 ]]; then
|
||||
fgcyan="%F{#5bcffa}"
|
||||
fgmagenta="%F{#f5abb9}"
|
||||
fgwhite="%F{#ffffff}"
|
||||
elif [[ $colorcount -eq 256 ]]; then
|
||||
fgcyan="\e[38;5;39m"
|
||||
fgmagenta="\e[38;5;210m"
|
||||
fgwhite="\e[38;5;255m"
|
||||
else
|
||||
fgcyan="$fg_bold[cyan]"
|
||||
fgmagenta="$fg_bold[magenta]"
|
||||
fgwhite="$fg_bold[white]"
|
||||
fi
|
||||
print "%{$fgcyan%}%n%{$fgwhite%}@%{$fgmagenta%}%m %{$fgwhite%}%~"
|
||||
}
|
||||
|
||||
prompt_functions+=prompt_userathost
|
||||
|
||||
Reference in New Issue
Block a user