Some of the supplied prompt styles of BashStyle-NG allow hooking into them, meaning you can define a function that will be automatically called from the prompt.
This allows you to add custom content to existing styles, without having to use the custom prompt builder or start from scratch. You need to place the desired hook in the file:
$HOME/.bashstyle.custom
The following lists the prompt style, name of the hook and where it takes effect:
separator style
vector style
clock style
equinox style
elite style
poweruser style
dirks style
sepa-ng style
quirk style
Additonally each hook-part features a color variable with the same naming scheme, eg.:
You can use one of the following predefined color names:
If you want to use theese predefinied colors not in the variable, but in the
function, you can access printable versions by prepending e to the color
name, eg.:
Note: if the terminal is set to dark (in the Style settings), then black becomes white, else white becomes black, that’s not a bug, but a feature.
Here’s an example that hooks into the sepa-ng prompt, we use gitkit
o show branch, revision (like svn revision) and current action in repository in
yellow:
SEPA_NG_1_COLOR=$yellow
SEPA_NG_1 () {
echo -e " $(gitkit branch):$(gitkit revno):$(gitkit action) "
}