• Stars
    star
    888
  • Rank 51,399 (Top 2 %)
  • Language
    Shell
  • License
    The Unlicense
  • Created over 11 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Powerline-style Bash prompt in pure Bash script. See also https://github.com/riobard/zsh-powerline

bash-powerline

Powerline for Bash in pure Bash script.

bash-powerline

Features

  • Git: show branch name, tag name, or unique short hash.
  • Git: show "*" symbol with uncommited modifications.
  • Git: show "↑" symbol and number of commits ahead of remote.
  • Git: show "↓" symbol and number of commits behind remote.
  • Platform-dependent prompt symbols.
  • Color-coded prompt symbol according to previous command execution status.
  • Use Bash builtin when possible to reduce delay. Delay sucks!
  • No need for patched fonts.

Installation

Download the Bash script

curl https://raw.githubusercontent.com/riobard/bash-powerline/master/bash-powerline.sh > ~/.bash-powerline.sh

And source it in your .bashrc

source ~/.bash-powerline.sh

For best result, use Solarized colorscheme for your terminal emulator. Or hack your own colorscheme by modifying the script. It's really easy.

Why?

This script is inspired by powerline-shell, which is implemented in Python. Python scripts are much easier to write and maintain than Bash scripts, but invoking Python interpreter introduces noticable delay to draw. I hate delays, so I ported just the part I need to pure Bash script.

The other reason is that I don't like the idea of patching fonts. The font patching mechanism from the original Powerline does not work with the bitmap font (Apple Monaco without anti-aliasing) I use on non-retina screens. I'd rather stick with existing unicode symbols.

See also

  • zsh-powerline: Same thing but for Zsh.
  • 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

More Repositories

1

go-shadowsocks2

Experimental Shadowsocks in Go. Stable fork at https://github.com/shadowsocks/go-shadowsocks2
Go
718
star
2

project-euler

My solutions to Project Euler in Python
Python
70
star
3

PRC-RID

Parse and extract information from a Resident Identity Card Number issued by People's Republic of China
Python
56
star
4

zsh-powerline

Powerline for Zsh in pure Zsh script. See also https://github.com/riobard/bash-powerline
Shell
38
star
5

go-acme

Automated Certificate Management Environment (ACME) client in Go using just standard library
Go
34
star
6

go-mmap

Easy handling of memory-mapped files
Go
22
star
7

font-awesome-svg

Split Font Awesome into individual SVG files
JavaScript
19
star
8

go-mailgun

Mailgun client in Go
Go
17
star
9

srt.py

A Python script to manipulate .srt subtitles
Python
15
star
10

dmarc

A tiny command-line utility to parse DMARC reports.
Go
13
star
11

hobox

Virtualbox-based development environments with ease
Python
12
star
12

loopman

My first real project in high school: audio player with easy A-B repeating. Windows only.
Visual Basic
12
star
13

go-bloom

Bloom filter in Go
Go
8
star
14

go-sendcloud

SendCloud mail API client in Go
Go
6
star
15

autoproxy

Automatically configure OS X to use SOCKS proxy via an SSH tunnel.
Shell
6
star
16

svgfont2js

Parse SVG font glyphs into JSON objects with normalized coordinates
JavaScript
6
star
17

go-x25519

x25519 Elliptic curve Diffie-Hellman key exchange over Curve25519
Go
6
star
18

osxutil

Various OS X utilities
Shell
4
star
19

go-snowrpc

SnowRPC client and server in Go.
Go
2
star
20

ses.py

Amazon Simple Email Service client in Python
Python
2
star
21

emaysms.py

Emay SMS client in Python
Python
2
star
22

go-beanpod

Beanstalkd client in Go with a friendly interface.
Go
2
star
23

dotfiles

My dot configuration files
Vim Script
2
star
24

CDHere

A Finder utility to launch a Terminal.app window at the current directory
1
star
25

Ricecast

Icecast stream splitter
Python
1
star
26

riobard

Special repo whose README.md shows on GitHub public profile
1
star
27

kx25519

libsodium-compatbile key exchange on Curve25519 with blake2b-512 hashing in Go
Go
1
star