Last Updated: February 25, 2016
·
1.241K
· destructuring

cue: bash prompt library

See https://github.com/destructuring/cue

Cue is a prompt library for bash. It gives you a Solarized prompt that looks like:

-- master:git-project ~ ------------------ defn@mikan --
-- 4:1 => 

Included plugins for git, current directory, ssh cookie trail, shell info, and error codes. It's Solarized and sets variables for using that palette. You can add custom prompt to the left or right side. Uses xtermcontrol to change palettes.

To add a yellow hello prompt next to the ssh prompt "defn@mikan", you redefine PS1_RIGHT:

export PS1_RIGHT='${prn_ssh}${prn_hello}'

and supply the function for hello:

function prompt_hello {
  echo " ${syellow}hello!"
}