- Shows the current path, trimmed in the middle for very long paths.
- Shows the current load and time when last command finished on very wide terminals, right aligned.
- When inside a Git repository, shows the current branch and state
- Shows the exit code of the previous command when non-zero
- Configurable colors (left and right)
- When no colors are configured, colors will be calculated based on the hostname. So every host will automatically display other colors.
Installation and configuration
To install the prompt take the following steps:
- Clone the repository somewhere on your system:
git clone git://github.com/teranex/dotfiles.git
- Source the trexprompt file from your .bashrc:
- Optionally configure colors:
This uses color codes for a 256-color terminal. You can use the xterm-colortest script from my dotfiles repository to find colors.