A set of shell functions for enhancing your Bash prompt with some Unicode goodness.
Why would you do that? Simple: More compact, easy-to-consume secondary information that would otherwise leave your prompt too cluttered.
A terminal program and font capable of displaying Unicode 6.1 characters, specifically the Emoji character set.
Simply clone this repo somewhere handy, then in your .bash_profile
,
.profile
, or .bashrc
(as appropriate), source the pieces that you want:
For example:
source /path/to/BashFu/bin/clock.sh
Modify the PS1
variable to call the relevant shell functions.
For example:
PS1="$(show_clock) \h:\W \u\$ "
show_clock
: Show a clock-face, rounded to the nearest half-hour. Example: ๐
rvm_mode
: Show a dot depending on the active RVM configuration:- White dot (โช): Using system ruby (no RVM ruby active).
- Red dot (๐ด): Using an RVM ruby, but NOT using an explicit gemset.
- Blue dot (๐ต): Using an RVM ruby, AND using an explicit gemset.
rvm_ruby_details
: Show a string indicating which ruby, which version/patch-level, and which gemset are in use. Shows nothing if an RVM ruby isn't active. Adds one space after the string if an RVM ruby is active. Example:[email protected]
power_mode
: Show a plug (๐) or battery (๐) to indicate whether the machine is drawing power from AC or battery respectively. (NOTE: Works best with a light background color, as the plug symbol is mostly black...)
- Various widgets to show information about the current git repo.
- More widgets to show information about the currently active RVM ruby / gemset.