Coder Social home page Coder Social logo

bash-powerline's Introduction

bash-powerline (JCBR Info’s fork)

Powerline-style Bash prompt in pure Bash script.

bash-powerline screenshot

This a fork of riobard/bash-powerline that includes many portability fixes and improvements.

Features

  • 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

Installation

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.

Why?

Because we should not need a Python interpreter and a patched font to display a poweline-style Bash prompt.

See also

  • 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

bash-powerline's People

Contributors

jcbrinfo avatar riobard avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

bash-powerline's Issues

Support Fossil

Considering we have a segment for Git, it will be great to have a segment for Fossil too.

Git fatal errors are displayed

For example, when I am in a interactive rebase, I get the following lines before the prompt:

fatal: HEAD ne pointe pas sur une branche
fatal: HEAD ne pointe pas sur une branche

It is really annoying, since the error messages mixes with the output of the last run command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.