Powerline-style Bash prompt in pure Bash script.
This a fork of riobard/bash-powerline that includes many portability fixes and improvements.
- Git status
- Displays current git branch name, or short SHA1 hash when the head is detached
- Displays the
+
symbol when current branch has uncommited changes - Displays the
⇡
symbol and the difference in the number of commits when the current branch is ahead of the remote - Displays the
⇣
symbol and the difference in the number of commits when the current branch is behind of the remote
- Status code for the previously failed command
- Fast execution (no noticable delay)
- No need for patched fonts
- More portable than the original
bash-powerline
script: Works on 16-colors terminals and does not rely on particular language settings. - Highly customizable
Download the Bash script
curl https://raw.github.com/jcbrinfo/bash-powerline/master/bash-powerline.sh > ~/.bash-powerline.sh
And source it in your .bashrc
. "$HOME/.bash-powerline.sh"
For best result, use Solarized colorscheme for your terminal emulator. Or hack your own color scheme by modifying the script. It's really easy.
Note: Some colors may not appear as expected. In order to fix this, change the
value of the POWERLINE_TERM_COLOR_ENCODING
constant of your
bash-powerline.sh
file. For details, see the comments in the script.
Because we should not need a Python interpreter and a patched font to display a poweline-style Bash prompt.
- powerline: Unified Powerline written in Python. This is the future of all Powerline derivatives.
- vim-powerline: Powerline in Vim writtien in pure Vimscript. Deprecated.
- tmux-powerline: Powerline for Tmux written in Bash script. Deprecated.
- powerline-shell: Powerline for Bash/Zsh/Fish implemented in Python. Might be merged into the unified Powerline.
- emacs powerline: Powerline for Emacs