Software‎ > ‎

Prompt Colorizer

Note: Download is at the bottom.
Prompt Colorizer is a set of small scripts that implement four different styles of colored prompts for a number of different shells. Each style displays session information including: username, hostname, current directory (short and long), date, time, and git repository information (the latter is for bash/zsh/fish only and only with git-core installed). Click on the image to the right to see samples of the four styles. The idea of this set of scripts is to have an easy to set up and decent prompt without putting in a lot of effort to configure it on multiple systems with differing default shells.

The list of currently supported shells is as follows:
  • bash
  • tcsh
  • zsh
  • ksh, pdksh, mksh
  • fish
  1. Move the prompt_colorizer directory into your home directory.
  2. Add the following line to your configuration file:
              source ~/prompt_colorizer/ N
    where N is 0, 1, 2, or 3 designating which style to use.
  3. Run the following command if using fish:
    fish -c "function source; . \$argv; return; end; funcsave source;"
  • Any modern versions of the shells should work.
  • I've tested the following:
    • bash 4.1.2 and greater.
    • tcsh 6.17.05 and greater.
    • zsh 5.0.0.
    • Various ksh variants.
    • fish 1.23.1.
June 2014:
November 2013:
  • Turn off zsh shell themes when running; otherwise prompt_colorizer styles won't apply.
  • Force terminate on unknown shell failure for cleaner failures.
May 2013:
  • Fixed fish git prompt support to work when not within a branch.
April 2013:
  • Now supports zsh, ksh (pdksh, mksh, ...), and fish shells.
  • Unsupported message no longer errors for unsupported shells.
  • Hint message is now only shown as an error.
  • tcsh now shows the trailing directory for style 2.
  • bash/zsh git prompt support is now taken from the git/contribs repository.
  • Added git prompt support for fish.
  • Changed style 1 slightly.
  • Added a new style (style 3).
March 2012:
  • Added support for new git bash completion locations (e.g. /usr/shared/bash-completion/git).
  • Fixed errors for servers with misconfigured bash completion (now the script sources the completion itself).
June 2011:
  • Added another prompt style.
  • Added git repository display for bash style prompts.
  • Added a third style.
February 2011:
  • Initial creation.

click to enlarge the images

SelectionFile type iconFile nameDescriptionSizeRevisionTimeUser

Simple prompt colorizer scripts.  29k v. 11 Jun 9, 2014, 6:03 PM Aaron Myles Landwehr