32 lines
888 B
Bash
32 lines
888 B
Bash
# PROMPT="%{$fg_bold[cyan]%}%n%{$fg_bold[white]%}@%{$fg_bold[magenta]%}%m %{$fg_bold[white]%}%~ %# %{$reset_color%}"
|
|
# RPROMPT="%(?..%{$fg[red]%}%? )$RPROMPT"
|
|
|
|
function prompt_userathost () {
|
|
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
|
|
|
|
function rprompt_clock () {
|
|
print "%{$fg_bold[black]%}%T"
|
|
}
|
|
|
|
function rprompt_retval () {
|
|
print "%(?..%{$fg[red]%}%?)"
|
|
}
|
|
|
|
rprompt_functions+=rprompt_clock
|
|
rprompt_functions+=rprompt_retval |