Put the following your .zshrc file:
typeset -A __Prompt
__Prompt[ITALIC_ON]=$'\e[3m'
__Prompt[ITALIC_OFF]=$'\e[23m'
plug "zap-zsh/singularisart-prompt"
Visible here are:
- Concise left-hand prompt consisting of:
- Last component of current directory (abbreviates $HOME to ~ if possible).
- Prompt marker, ❯, the
"HEAVY RIGHT-POINTING ANGLE QUOTATION MARK ORNAMENT"
(that's
\u276f
, ore2 9d af
in UTF-8).
- Extended right-hand size prompt which auto-hides when necessary to make room
for long commands and contains:
- Duration of previous command in adaptive units (seconds, minutes, hours, days, depending on duration).
- Current version control branch name.
- Current version control worktree status using colors that match those used
in
git status
:- Green dot indicates staged changes.
- Red dot indicates unstaged changes.
- Blue dot indicates untracked files.
- Full version of current working directory (again, abbreviating
$HOME
to~
).
Nested shells are indicated with additional prompt characters. For example, one nested shell:
Two nested shells:
Root shells are indicated with a different color prompt character and the word "root":
Nesting within a root shell is indicated like this:
Two nested shells:
Tmux shells are indicated with a different color prompt character and the word "tmux":
Nesting within a tmux shell is indicated like this:
Two nested shells:
If the last command exited with a non-zero status (usually indicative of an error), a yellow exclamation is shown:
If there are background processes, a yellow asterisk is shown:
I kinda just took the base template from wincent, and tweaked it according to my own liking.