Home

Awesome

About

After having used prompt pure for about a year, I felt that a two-line prompt was not for me. Also not utilizing the right side of the terminal seemed a missed opportunity. Still there is much to like: the elapsed time of a process, the coloring of the prompt if the exit code of the process isn't 0, git integration. So I took "pure", mixed in my ideas of what a prompt should look like and came up with "lean" - a 1 line prompt that stays out of your face.

When lean starts, only 2 characters show on the screen '%' on the left and '~' on the right.

lean example gif

So lean is an evolution of pure, with the following changes:

Installation

zgen

If you use zgen you can add the following to your ~/.zshrc:

zgen load miekg/lean

and force reload with zgen reset && source ~/.zshrc.

Note you must have the option PROMPT_SUBST set, see zshoptions(1).

prezto

If you use prezto you should do the following:

cd $ZPREZTODIR && git clone --recurse-submodules https://github.com/belak/prezto-contrib contrib

Then in ~/.zpreztorc add contrib-prompt to module load list and select lean as a theme:

zstyle ':prezto:load' pmodule \
  ... \
  'contrib-prompt' \
  'prompt' \
  ...

zstyle ':prezto:module:prompt' theme 'lean'

PROMPT_LEAN_LEFT and PROMPT_LEAN_RIGHT should be customized in ~/.zshrc. The rest variables should be customized in ~/.zshenv.

Development

If you make any changes please run make test to ensure the (little) test suite is succesfull.