zsh/zshrc: new and improved prompt

This commit is contained in:
Callum Renwick 2020-08-28 13:09:31 +01:00
parent 8a4791e870
commit 1dcd8dbfc4
1 changed files with 11 additions and 0 deletions

View File

@ -16,3 +16,14 @@ setopt CORRECT
alias ls="ls --color=auto"
alias swirc="swirc -r cren -u cren -n cren"
alias gcc="gcc -Wall"
alias links="links -driver x"
# Prompt
# Load colour module for marking up prompt
autoload -U colors && colors
# There appears to be an extra %B in the following line, but it is
# necessary. Without it, the ] from the jobs notifier fails to appear
# in boldface. I think that resetting the colours is also resetting
# all the character attributes.
export PS1="%(1j.%B[%{$fg[green]%}%j%{$reset_color%}%B]%b .)[%{$fg[magenta]%}%m%{$reset_color%}:%{$fg[blue]%}%3~%{$reset_color%}] %# "
export RPS1="%(?..%B%{$fg[red]%}%?%{$reset_color%}%b)"