Skip to content
Matteo Giordano edited this page Oct 16, 2013 · 37 revisions

Customizations

Show exit code of last command as a separate prompt character

prompt screenshot

The prompt character still turns red if the last command didn't exit with 0, but adds another magenta ❯ to show that it was the previous command that failed. (psst my colors are different ;) )

replace: PROMPT='%(?.%F{magenta}.%F{red})❯%f '

with: PROMPT='%(?.%F{magenta}.%F{red}❯%F{magenta})❯%f '

Show current mode when using vi keybindings

prompt screenshot

Add in prompt_pure_setup()

zstyle ':prezto:module:editor:info:keymap:primary'   format "❯%f"
zstyle ':prezto:module:editor:info:keymap:alternate' format "❮%f"

and change the PROMPT line to

PROMPT='%(?.%F{magenta}.%F{red})${editor_info[keymap]} '

It works using prezto, still looking for a generic solution

Inspired

@sapegin’s Bash Prompt

prompt screenshot

Bash prompt and color theme for Terminal.app.

Clone this wiki locally