jtyr
gbt
Go

Highly configurable prompt builder for Bash, ZSH and PowerShell written in Go.

Last updated May 28, 2026
559
Stars
35
Forks
2
Issues
0
Stars/day
Attention Score
24
Language breakdown
Go 62.8%
Shell 36.5%
M4 0.4%
Makefile 0.4%
β–Έ Files click to expand
README

Go Bullet Train (GBT) =====================

Highly configurable prompt builder for Bash, ZSH and PowerShell written in Go. It's inspired by the Oh My ZSH Bullet Train theme but runs significantly faster.

Demo

GBT comes with an interesting feature called prompt forwarding which allows to forward user-defined prompt to a remote machine and have the same-looking prompt across all machines via SSH but also in Docker, Kubectl, Vagrant, MySQL or in Screen without the need to install anything remotely.

Prompt forwarding demo

All the above works well on Linux (Terminator, Konsole, Gnome Terminal), Mac (Terminal, iTerm), Android (Termux) and Windows (PowerShell, Windows Terminal).

Release Build status Coverage Status Packagecloud

Table of contents


- Installation - Arch Linux - CentOS/RHEL - Ubuntu/Debian - Mac - Windows - Android - From the source code - Activation - Fonts and colors - Colors - Formatting - Train variables - Cars variables - Aws car - Azure car - Custom car - Dir car - ExecTime car - Gcp car - Git car - Hostname car - Kubectl car - Os car - PyVirtEnv car - Sign car - Status car - Time car - Principle - Additional settings - MacOS users - Limitations

Setup


In order to setup GBT on your machine, you have to install it, activate it and setup a special font in your terminal (optional).

Installation

Arch Linux

yaourt -S gbt

Or install gbt-git if you would like to run the latest greatest from the master branch.

CentOS/RHEL

Packages hosted by Packagecloud:

echo '[gbt]
name=GBT YUM repo
baseurl=https://packagecloud.io/gbt/release/el/7/$basearch
gpgkey=https://packagecloud.io/gbt/release/gpgkey
       https://packagecloud.io/gbt/release/gpgkey/gbt-release-4C6E79EFF45439B6.pub.gpg
gpgcheck=1
repo_gpgcheck=1' | sudo tee /etc/yum.repos.d/gbt.repo >/dev/null
sudo yum install gbt

Use the exact repository definition from above for all RedHat-based distribution regardless its version.

Ubuntu/Debian

Packages hosted by Packagecloud:

curl -L https://packagecloud.io/gbt/release/gpgkey | sudo apt-key add -
echo 'deb https://packagecloud.io/gbt/release/ubuntu/ xenial main' | sudo tee /etc/apt/sources.list.d/gbt.list >/dev/null
sudo apt-get update
sudo apt-get install gbt

Use the exact repository definition from above for all Debian-based distribution regardless its version.

Mac

Using brew:

brew tap jtyr/repo
brew install gbt
Or install gbt-git if you would like to run the latest greatest from the master branch:
brew tap jtyr/repo
brew install --HEAD gbt-git

Windows

Using choco:

choco install gbt

Using scoop:

scoop install gbt

Or manually by copying the gbt.exe file into a directory listed in the PATH environment variable (e.g. C:\Windows\system32).

Android

Install Termux from Google Play Store and then type this in the Termux app:

apt update
apt install gbt

From the source code

Make sure Go is installed and then run the following on Linux and Mac:

mkdir ~/go
export GOPATH=~/go
export PATH="$PATH:$GOPATH/bin"
go get github.com/jtyr/gbt/cmd/gbt

Or the following on Windows using PowerShell:

mkdir ~/go
$Env:GOPATH = '~/go'
$Env:PATH = "~/go/bin;$Env:PATH"
go install github.com/jtyr/gbt/cmd/gbt@latest

Activation

After GBT is installed, it can be activated by calling it from the shell prompt variable:

# For Bash
PS1='$(gbt $?)'

For ZSH

PROMPT='$(gbt $?)'

If you are using ZSH together with some shell framework (e.g. Oh My ZSH), your shell is processing a fair amount of shell scripts upon ever prompt appearance. You can speed up your shell by removing the framework dependency from your configuration and replacing it with GBT and a simple ZSH configuration. Combining pure ZSH configuration with GBT will provide the best possible performance for your shell.

To activate GBT in PowerShell, run the following in the console or store it to the PowerShell profile file (echo $profile):

function prompt {
    $rc = [int]$(-Not $?)
    $Env:GBT_SHELL = 'plain'
    $Env:PWD = get-location
    $Env:GBTCARCUSTOM_EXECUTOR='powershell.exe'
    $Env:GBTCARCUSTOMEXECUTORPARAM='-Command'
    $gbt_output = & @({gbt $rc},{gbt.exe $rc})[$PSVersionTable.PSVersion.Major -lt 6 -or $IsWindows] | Out-String
    $gbtoutput = $gbtoutput -replace ([Environment]::NewLine + '$'), ''
    Write-Host -NoNewline $gbt_output
    return [char]0
}

Needed only on Windows

[console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding

Fonts and colors

Although GBT can be configured to use only ASCII characters (see basic theme), the default configuration uses some UTF-8 characters which require special font. In order to display all characters of the default prompt correctly, the shell should support UTF-8 and Nerd fonts (or at least the DejaVuSansMono Nerd font) should be installed. On Linux, you can install it like this:

mkdir ~/.fonts
curl -L -o ~/.fonts/DejaVuSansMonoNerdFontCompleteMono.ttf https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DejaVuSansMono/Regular/complete/DejaVu%20Sans%20Mono%20Nerd%20Font%20Complete%20Mono.ttf
fc-cache

On Mac, it can be installed via brew:

brew tap homebrew/cask-fonts
brew install --cask font-dejavu-sans-mono-nerd-font

On Windows, it can be installed via choco:

choco install font-nerd-DejaVuSansMono

Or via scoop:

scoop bucket add nerd-fonts
scoop install DejaVuSansMono-NF

Or just download the font, open it and then install it.

Once the font is installed, it has to be set in the terminal application to render all prompt characters correctly. Search for the font name DejaVuSansMono Nerd Font Mono on Linux and Mac and DejaVuSansMono NF on Windows.

In order to have the Nerd font in Termux on Android, you have to install Termux:Styling application. Then longpress the terminal screen and select MORE... β†’ Style β†’ CHOOSE FONT and there choose the DejaVu font.

Some Unix terminals might not use 256 color palette by default. In such case try to set the following:

export TERM='xterm-256color'

Configuration


The prompt (train) is assembled from several elements (cars). The look and behavior of whole train as well as each car can be influenced by a set of environment variables. To set the environment variable, use export in the Linux and Mac shell and $Env: on Windows.

Colors

The value of all BG and FG variables defines the background and foreground color of the particular element. The value of the color can be specified in 3 ways:

Color name

Only a limited number of named colors is supported:

  • black black
  • red red
  • green green
  • yellow yellow
  • blue blue
  • magenta magenta
  • cyan cyan
  • light<em>gray lightgray
  • dark<em>gray darkgray
  • light<em>red lightred
  • light<em>green lightgreen
  • light<em>green lightyellow
  • light<em>blue lightblue
  • light<em>magenta lightmagenta
  • light<em>cyan lightcyan
  • white white
  • default (default color of the terminal)
Examples:
# Set the background color of the Dir car to red
export GBTCARDIR_BG='red'

Set the foreground color of the Dir car to white

export GBTCARDIR_FG='white'

Color number

Color can also by expressed by a single number in the range from 0 to 255. The color of each number in that range is visible in the 256-color lookup table on Wikipedia. The named colors described above are the first 16 numbers from the lookup table.

Examples:

# Set the background color of the Dir car to red
export GBTCARDIR_BG='1'

Set the foreground color of the Dir car to white

export GBTCARDIR_FG='15'

RGB color

Arbitrary color can be expressed in the form of RGB triplet.

Examples:

# Set the background color of the Dir car to red
export GBTCARDIR_BG='170;0;0'

Set the foreground color of the Dir car to white

export GBTCARDIR_FG='255;255;255'

Color scheme resistance

GBT is using 8-bit color palette to color individual cars of the train. First 16 colors (Standart and High-intensity colors) of the palette are prone to a change if the terminal is using some color scheme (e.g. Solarized)). That means that if one GBT train uses mixture of the first 16 and the remaining 240 colors, the look might be inconsistent because some of the colors might change (depending on the color scheme) and some not. Luckily the first 16 colors can be found in the remaining 240 colors and therefore GBT can automatically convert the first 16 colors into higher colors which provides consistent look regardless the color scheme. This works automatically for color names as well as for color numbers. If needed, the automatic conversion can be disabled with the following variable:

export GBTFORCEHIGHER_COLORS='0'

Formatting

Formatting is done via _FM variables. The possible values are:

  • normal
Makes the text normal.
  • dim
Makes the text dim.
  • bold
Makes the text bold. Not all font characters have variant for bold formatting.
  • underline
Makes the text underlined.
  • blink
Makes the text to blink.
  • invert
Makes the text color inverted.
  • hide
Makes the text hidden.
  • none
No formatting applied.

Multiple formattings can be combined into comma-separated list.

Examples:

# Set the directory name to be bold
  export GBTCARDIR_FM='bold'
  # Set the directory name to be bold and underlined
  export GBTCARDIR_FM='bold,underline'

Train variables

  • GBT_CARS='Status, Os, Hostname, Dir, Git, Sign'
List of cars used in the train.

To add a new car into the train, the whole variable must be redefined. For example in order to add the Time car into the default set of cars between the Os and Hostname car, the variable should look like this:

export GBT_CARS='Status, Os, Time, Hostname, Dir, Git, Sign'
  • GBT_RCARS='Time'
The same like GBT_CARS but for the right hand side prompt.
# Add the Custom car into the right hand site car to have the separator visible
  export GBT_RCARS='Custom, Time'
  # Make the Custom car to be invisible (zero length text)
  export GBTCARCUSTOM_BG='default'
  export GBTCARCUSTOM_FORMAT=''
  # Show only time
  export GBTCARTIME_FORMAT=' {{ Time }} '
  # Set the right hand side prompt (ZSH only)
  RPROMPT='$(gbt -right)'
  • GBT_SEPARATOR='ξ‚°'
Character used to separate cars in the train.
  • GBT_RSEPARATOR='ξ‚²'
The same like GBT_SEPARATOR but for the right hand side prompt.
  • GBTCARBG
Background color inherited by the top background color variable of every car. That allows to set the background color of all cars via single variable.
  • GBTCARFG
Foreground color inherited by the top foreground color variable of every car. That allows to set the foreground color of all cars via single variable.
  • GBTCARFM
Formatting inherited by the top formatting variable of every car. That allows to set the formatting of all cars via single variable.
  • GBTBEGINNINGBG='default'
Background color of the text shown at the beginning of the train.
  • GBTBEGINNINGFG='default'
Foreground color of the text shown at the beginning of the train.
  • GBTBEGINNINGFM='none'
Formatting of the text shown at the beginning of the train.
  • GBTBEGINNINGTEXT=''
Text shown at the beginning of the train.
  • GBT_SHELL
Indicates which shell is used. The value can be either zsh, bash or plain. By default, the value is extracted from the $SHELL environment variable. Set this variable to bash if your default shell is ZSH but you want to test GBT in Bash:
export GBT_SHELL='bash'
  bash
If set to plain, no shell-specific decoration is included in the output text. That's suitable for displaying the GBT-generated string in the console output.
  • GBT_DEBUG='0'
Shows more verbose output if some of the car modules cannot be imported.

Cars variables

Aws car

Car that displays information about the local AWS configuration.

  • GBTCARAWS_BG='166'
Background color of the car.
  • GBTCARAWS_FG='white'
Foreground color of the car.
  • GBTCARAWS_FM='none'
Formatting of the car.
  • GBTCARAWS_FORMAT=' {{ Icon }} {{ Project }} '
Format of the car.
  • GBTCARAWSICONBG
Background color of the {{ Icon }} element.
  • GBTCARAWSICONFG
Foreground color of the {{ Icon }} element.
  • GBTCARAWSICONFM
Formatting of the {{ Icon }} element.
  • GBTCARAWS_IC
Text content of the {{ Icon }} element.
  • GBTCARAWSPROFILEBG
Background color of the {{ Profile }} element.
  • GBTCARAWSPROFILEFG
Foreground color of the {{ Profile }} element.
  • GBTCARAWSPROFILEFM
Formatting of the {{ Profile }} element.
  • GBTCARAWSPROFILETEXT
Text content of the {{ Profile }} element specifying the configured profile.
  • GBTCARAWSREGIONBG
Background color of the {{ Region }} element.
  • GBTCARAWSREGIONFG
Foreground color of the {{ Region }} element.
  • GBTCARAWSREGIONFM
Formatting of the {{ Region }} element.
  • GBTCARAWSREGIONTEXT
Text content of the {{ Region }} element specifying the configured region.
  • GBTCARAWS_DISPLAY
Whether to display this car if it's in the list of cars (GBT_CARS).
  • GBTCARAWS_WRAP='0'
Whether to wrap the prompt line in front of this car.
  • GBTCARAWSSEPTEXT
Text content of the separator for this car.
  • GBTCARAWSSEPBG
Background color of the separator for this car.
  • GBTCARAWSSEPFG
Foreground color of the separator for this car.
  • GBTCARAWSSEPFM
Formatting of the separator for this car.

Azure car

Car that displays information about the local Azure configuration.

  • GBTCARAZURE_BG='32'
Background color of the car.
  • GBTCARAZURE_FG='white'
Foreground color of the car.
  • GBTCARAZURE_FM='none'
Formatting of the car.
  • GBTCARAZURE_FORMAT=' {{ Icon }} {{ Subscription }} '
Format of the car.
  • GBTCARAZUREICONBG
Background color of the {{ Icon }} element.
  • GBTCARAZUREICONFG
Foreground color of the {{ Icon }} element.
  • GBTCARAZUREICONFM
Formatting of the {{ Icon }} element.
  • GBTCARAZURE_IC
Text content of the {{ Icon }} element.
  • GBTCARAZURECLOUDBG
Background color of the {{ Cloud }} element.
  • GBTCARAZURECLOUDFG
Foreground color of the {{ Cloud }} element.
  • GBTCARAZURECLOUDFM
Formatting of the {{ Cloud }} element.
  • GBTCARAZURECLOUDTEXT
Text content of the {{ Cloud }} element specifying the configured cloud.
  • GBTCARAZURESUBSCRIPTIONBG
Background color of the {{ Subscription }} element.
  • GBTCARAZURESUBSCRIPTIONFG
Foreground color of the {{ Subscription }} element.
  • GBTCARAZURESUBSCRIPTIONFM
Formatting of the {{ Subscription }} element.
  • GBTCARAZURESUBSCRIPTIONTEXT
Text content of the {{ Subscription }} element specifying the configured subscription.
  • GBTCARAZUREUSERNAMEBG
Background color of the {{ UserName }} element.
  • GBTCARAZUREUSERNAMEFG
Foreground color of the {{ UserName }} element.
  • GBTCARAZUREUSERNAMEFM
Formatting of the {{ UserName }} element.
  • GBTCARAZUREUSERNAMETEXT
Text content of the {{ UserName }} element specifying the configured user name.
  • GBTCARAZUREUSERTYPEBG
Background color of the {{ UserType }} element.
  • GBTCARAZUREUSERTYPEFG
Foreground color of the {{ UserType }} element.
  • GBTCARAZUREUSERTYPEFM
Formatting of the {{ UserType }} element.
  • GBTCARAZUREUSERTYPETEXT
Text content of the {{ UserType }} element specifying the configured user type.
  • GBTCARAZURESTATEBG
Background color of the {{ State }} element.
  • GBTCARAZURESTATEFG
Foreground color of the {{ State }} element.
  • GBTCARAZURESTATEFM
Formatting of the {{ State }} element.
  • GBTCARAZURESTATETEXT
Text content of the {{ State }} element specifying the configured subscription state.
  • GBTCARAZUREDEFAULTSGROUP_BG
Background color of the {{ DefaultsGroup }} element.
  • GBTCARAZUREDEFAULTSGROUP_FG
Foreground color of the {{ DefaultsGroup }} element.
  • GBTCARAZUREDEFAULTSGROUP_FM
Formatting of the {{ DefaultsGroup }} element.
  • GBTCARAZUREDEFAULTSGROUP_TEXT
Text content of the {{ DefaultsGroup }} element specifying the configured default resource group.
  • GBTCARAZURE_DISPLAY
Whether to display this car if it's in the list of cars (GBT_CARS).
  • GBTCARAZURE_WRAP='0'
Whether to wrap the prompt line in front of this car.
  • GBTCARAZURESEPTEXT
Text content of the separator for this car.
  • GBTCARAZURESEPBG
Background color of the separator for this car.
  • GBTCARAZURESEPFG
Foreground color of the separator for this car.
  • GBTCARAZURESEPFM
Formatting of the separator for this car.

Custom car

The main purpose of this car is to provide the possibility to create car with custom text.

  • GBTCARCUSTOM_BG='yellow'
Background color of the car.
  • GBTCARCUSTOM_FG='default'
Foreground color of the car.
  • GBTCARCUSTOM_FM='none'
Formatting of the car.
  • GBTCARCUSTOM_FORMAT=' {{ Text }} '
Format of the car.
  • GBTCARCUSTOMTEXTBG
Background color of the {{ Text }} element.
  • GBTCARCUSTOMTEXTFG
Foreground color of the {{ Text }} element.
  • GBTCARCUSTOMTEXTFM
Formatting of the {{ Text }} element.
  • GBTCARCUSTOMTEXTTEXT='?'
Text content of the {{ Text }} element.
  • GBTCARCUSTOMTEXTCMD
The {{ Text }} element will be replaced by standard output of the command specified in this variable. Content of the GBTCARCUSTOMTEXTTEXT variable takes precedence over this variable.
# Show 1 minute loadavg as the content of the Text element
  export GBTCARCUSTOMTEXTCMD="uptime | sed -e 's/.load average: //' -e 's/,.//'"
  • GBTCARCUSTOMTEXTEXECUTOR='sh'
Executor used to execute all text command (TEXTCMD).
  • GBTCARCUSTOMTEXTEXECUTOR='-c'
Parameter for the executor used to execute text command (TEXTCMD).
  • GBTCARCUSTOM_DISPLAY='1'
Whether to display this car if it's in the list of cars (GBT_CARS).
  • GBTCARCUSTOMDISPLAYCMD
Command which gets executed in order to evaluate whether the car should be displayed or not. Content of the GBTCARCUSTOM_DISPLAY variable takes precedence over this variable.
  • GBTCARCUSTOMDISPLAYEXECUTOR='sh'
Executor used to execute all display command (TEXTCMD).
  • GBTCARCUSTOMDISPLAYEXECUTOR='-c'
Parameter for the executor used to execute display command (TEXTCMD).
# Show percentage of used disk space of the root partition
  export GBTCARCUSTOMTEXTCMD="df -h --output=pcent / | tail -n1 | sed -re 's/\s//g' -e 's/%/%%/'"
  # Display the car only if the percentage is above 90%
  export GBTCARCUSTOMDISPLAYCMD="[[ $(df -h --output=pcent / | tail -n1 | sed -re 's/\s//g' -e 's/%//') -gt 70 ]] && echo YES"
  • GBTCARCUSTOM_WRAP='0'
Whether to wrap the prompt line in front of this car.
  • GBTCARCUSTOM_EXECUTOR='sh'
Executor used to execute all custom commands (TEXTCMD and DISPLAYCMD).
  • GBTCARCUSTOM_EXECUTOR='-c'
Parameter for the executor used to execute all custom commands (TEXTCMD and DISPLAYCMD).
  • GBTCARCUSTOMSEPTEXT
Text content of the separator for this car.
  • GBTCARCUSTOMSEPBG
Background color of the separator for this car.
  • GBTCARCUSTOMSEPFG
Foreground color of the separator for this car.
  • GBTCARCUSTOMSEPFM
Formatting of the separator for this car.

Multiple Custom cars can be used in the GBT_CARS variable. Just add some identifier behind the car name. To set properties of the new car, just add the same identifier into the environment variable:

# Adding Custom and Custom1 car
export GBT_CARS='Status, Os, Custom, Custom1, Hostname, Dir, Git, Sign'

The text of the default Custom car

export GBTCARCUSTOMTEXTTEXT='default'

The text of the Custom1 car

export GBTCARCUSTOM1TEXTTEXT='1'

Set different background color for the Custom1 car

export GBTCARCUSTOM1_BG='magenta'

Dir car

Car that displays current directory name.

  • GBTCARDIR_BG='blue'
Background color of the car.
  • GBTCARDIRFG='lightgray'
Foreground color of the car.
  • GBTCARDIR_FM='none'
Formatting of the car.
  • GBTCARDIR_FORMAT=' {{ Dir }} '
Format of the car.
  • GBTCARDIRDIRBG
Background color of the {{ Dir }} element.
  • GBTCARDIRDIRFG
Foreground color of the {{ Dir }} element.
  • GBTCARDIRDIRFM
Formatting of the {{ Dir }} element.
  • GBTCARDIRDIRTEXT
Text content of the {{ Dir }} element. The directory name.
  • GBTCARDIR_DIRSEP
OS-default character used to separate directories.
  • GBTCARDIR_HOMESIGN='~'
Character which represents the user's home directory. If set to empty string, full home directory path is used instead.
  • GBTCARDIR_DEPTH='1'
Number of directories to show.
  • GBTCARDIR_N
Indicates how many characters of the non-current directory name should be displayed. This can be set to 1 to display only the first character of the directory name when using GBTCARDIR_DEPTH with value grater than one.
  • GBTCARDIR_DISPLAY='1'
Whether to display this car if it's in the list of cars (GBT_CARS).
  • GBTCARDIR_WRAP='0'
Whether to wrap the prompt line in front of this car.
  • GBTCARDIRSEPTEXT
Text content of the separator for this car.
  • GBTCARDIRSEPBG
Background color of the separator for this car.
  • GBTCARDIRSEPFG
Foreground color of the separator for this car.
  • GBTCARDIRSEPFM
Formatting of the separator for this car.

ExecTime car

Car that displays how long each shell command run.

  • GBTCAREXECTIMEBG='lightgray'
Background color of the car.
  • GBTCAREXECTIME_FG='black'
Foreground color of the car.
  • GBTCAREXECTIME_FM='none'
Formatting of the car.
  • GBTCAREXECTIME_FORMAT=' {{ Time }} '
Format of the car.
  • GBTCAREXECTIMEDURATIONBG
Background color of the {{ Duration }} element.
  • GBTCAREXECTIMEDURATIONFG
Foreground color of the {{ Duration }} element.
  • GBTCAREXECTIMEDURATIONFM
Formatting of the {{ Duration }} element.
  • GBTCAREXECTIMEDURATIONTEXT
Text content of the {{ Duration }} element. The duration of the execution time (e.g 1h8m19s135ms for precision set to 3).
  • GBTCAREXECTIMESECONDSBG
Background color of the {{ Seconds }} element.
  • GBTCAREXECTIMESECONDSFG
Foreground color of the {{ Seconds }} element.
  • GBTCAREXECTIMESECONDSFM
Formatting of the {{ Seconds }} element.
  • GBTCAREXECTIMESECONDSTEXT
Text content of the {{ Seconds }} element. The execution time in seconds (e.g. 4099.1358 for precision set to 4).
  • GBTCAREXECTIMETIMEBG
Background color of the {{ Time }} element.
  • GBTCAREXECTIMETIMEFG
Foreground color of the {{ Time }} element.
  • GBTCAREXECTIMETIMEFM
Formatting of the {{ Time }} element.
  • GBTCAREXECTIMETIMETEXT
Text content of the {{ Time }} element. The execution time (e.g. 01:08:19.1358 for precision set to 4).
  • GBTCAREXECTIME_PRECISION='0'
Sub-second precision to show.
  • GBTCAREXECTIME_SECS
The number of seconds the command run in shell. This variable is defined in the source file as shown bellow.
  • GBTCAREXECTIME_BELL='0'
Sound console bell if the executed command exceeds specified number of seconds. Value set to 0 disables the bell (default).
  • GBTCAREXECTIME_DISPLAY='1'
Whether to display this car if it's in the list of cars (GBT_CARS).
  • GBTCAREXECTIME_WRAP='0'
Whether to wrap the prompt line in front of this car.
  • GBTCAREXECTIMESEPTEXT
Text content of the separator for this car.
  • GBTCAREXECTIMESEPBG
Background color of the separator for this car.
  • GBTCAREXECTIMESEPFG
Foreground color of the separator for this car.
  • GBTCAREXECTIMESEPFM
Formatting of the separator for this car.

In order to allow this car to calculate the execution time, the following must be loaded in the shell:

# For Bash
source /usr/share/gbt/sources/exectime/bash.sh

For ZSH

source /usr/share/gbt/sources/exectime/zsh.sh

On macOS the date command does not support %N format for milliseconds and you need to override the environment variable GBT_SOURCEDATE_ARG='+%s.

Gcp car

Car that displays information about the local GCP configuration.

  • GBTCARGCP_BG='33'
Background color of the car.
  • GBTCARGCP_FG='white'
Foreground color of the car.
  • GBTCARGCP_FM='none'
Formatting of the car.
  • GBTCARGCP_FORMAT=' {{ Icon }} {{ Project }} '
Format of the car.
  • GBTCARGCPICONBG
Background color of the {{ Icon }} element.
  • GBTCARGCPICONFG
Foreground color of the {{ Icon }} element.
  • GBTCARGCPICONFM
Formatting of the {{ Icon }} element.
  • GBTCARGCP_IC
Text content of the {{ Icon }} element.
  • GBTCARGCPACCOUNTBG
Background color of the {{ Account }} element.
  • GBTCARGCPACCOUNTFG
Foreground color of the {{ Account }} element.
  • GBTCARGCPACCOUNTFM
Formatting of the {{ Account }} element.
  • GBTCARGCPACCOUNTTEXT
Text content of the {{ Account }} element specifying the configured account.
  • GBTCARGCPCONFIGBG
Background color of the {{ Config }} element.
  • GBTCARGCPCONFIGFG
Foreground color of the {{ Config }} element.
  • GBTCARGCPCONFIGFM
Formatting of the {{ Config }} element.
  • GBTCARGCPCONFIGTEXT
Text content of the {{ Config }} element specifying the active configuration.
  • GBTCARGCPPROJECTBG
Background color of the {{ Project }} element.
  • GBTCARGCPPROJECTFG
Foreground color of the {{ Project }} element.
  • GBTCARGCPPROJECTFM
Formatting of the {{ Project }} element.
  • GBTCARGCPPROJECTTEXT
Text content of the {{ Project }} element specifying the configured project.
  • GBTCARGCPPROJECTALIASES
List of aliases that allow to display different project name based on the original name. The following example shows how to change the project my-dev-project-123456 to dev and the project my-prod-project-654321 to prod.
export GBTCARGCPPROJECTALIASES='
    my-dev-project-123456=dev,
    my-prod-project-654321=prod,
  '
  • GBTCARGCP_DISPLAY
Whether to display this car if it's in the list of cars (GBT_CARS).
  • GBTCARGCP_WRAP='0'
Whether to wrap the prompt line in front of this car.
  • GBTCARGCPSEPTEXT
Text content of the separator for this car.
  • GBTCARGCPSEPBG
Background color of the separator for this car.
  • GBTCARGCPSEPFG
Foreground color of the separator for this car.
  • GBTCARGCPSEPFM
Formatting of the separator for this car.

Git car

Car that displays information about a local Git repository. This car is displayed only if the current directory is a Git repository.

  • GBTCARGITBG='lightgray'
Background color of the car.
  • GBTCARGIT_FG='black'
Foreground color of the car.
  • GBTCARGIT_FM='none'
Formatting of the car.
  • GBTCARGIT_FORMAT=' {{ Icon }} {{ Head }} {{ Status }}{{ Ahead }}{{ Behind }} '
Format of the car.
  • GBTCARGITICONBG
Background color of the {{ Icon }} element.
  • GBTCARGITICONFG
Foreground color of the {{ Icon }} element.
  • GBTCARGITICONFM
Formatting of the {{ Icon }} element.
  • GBTCARGIT_IC
Text content of the {{ Icon }} element.
  • GBTCARGITHEADBG
Background color of the {{ Head }} element.
  • GBTCARGITHEADFG
Foreground color of the {{ Head }} element.
  • GBTCARGITHEADFM
Formatting of the {{ Head }} element.
  • GBTCARGITHEADTEXT
Text content of the {{ Head }} element - branch, tag name or the commit ID.
  • GBTCARGITSTATUSBG
Background color of the {{ Status }} element.
  • GBTCARGITSTATUSFG
Foreground color of the {{ Status }} element.
  • GBTCARGITSTATUSFM
Formatting of the {{ Status }} element.
  • GBTCARGITSTATUSFORMAT
Format of the {{ Status }} element. The content is either {{ StatusDirty }} or {{ StatusClean }} depending on the state of the local Git repository.
  • GBTCARGITSTATUSDIRTY_BG
Background color of the {{ StatusDirty }} element.
  • GBTCARGITSTATUSDIRTY_FG='red'
Foreground color of the {{ StatusDirty }} element.
  • GBTCARGITSTATUSDIRTY_FM
Formatting of the {{ StatusDirty }} element.
  • GBTCARGITSTATUSDIRTY_TEXT='✘'
Text content of the {{ StatusDirty }} element.
  • GBTCARGITSTATUSCLEAN_BG
Background color of the {{ StatusClean }} element.
  • GBTCARGITSTATUSCLEAN_FG='green'
Foreground color of the {{ StatusClean }} element.
  • GBTCARGITSTATUSCLEAN_FM
Formatting of the {{ StatusClean }} element.
  • GBTCARGITSTATUSCLEAN_TEXT='βœ”'
Text content of the {{ StatusClean }} element.
  • GBTCARGITSTATUSADDED_BG
Background color of the {{ StatusAdded }} element.
  • GBTCARGITSTATUSADDED_FG
Foreground color of the {{ StatusAdded }} element.
  • GBTCARGITSTATUSADDED_FM
Formatting of the {{ StatusAdded }} element.
  • GBTCARGITSTATUSADDED_FORMAT='{{ StatusAddedSymbol }}'
Format of the the {{ StatusAdded }} element. It can be {{ StatusAddedSymbol }} or {{ StatusAddedCount }}.
  • GBTCARGITSTATUSADDEDSYMBOLBG
Background color of the {{ StatusAddedSymbol }} element.
  • GBTCARGITSTATUSADDEDSYMBOLFG
Foreground color of the {{ StatusAddedSymbol }} element.
  • GBTCARGITSTATUSADDEDSYMBOLFM
Formatting of the {{ StatusAddedSymbol }} element.
  • GBTCARGITSTATUSADDEDSYMBOLTEXT=' ⟴'
Text content of the {{ StatusAddedSymbol }} element.
  • GBTCARGITSTATUSADDEDCOUNTBG
Background color of the {{ StatusAddedCount }} element.
  • GBTCARGITSTATUSADDEDCOUNTFG
Foreground color of the {{ StatusAddedCount }} element.
  • GBTCARGITSTATUSADDEDCOUNTFM
Formatting of the {{ StatusAddedSymbol }} element.
  • GBTCARGITSTATUSADDEDCOUNTTEXT
Text content of the {{ StatusAddedCount }} element. By default it contains a number of added files.
  • GBTCARGITSTATUSCOPIED_BG
Background color of the {{ StatusCopied }} element.
  • GBTCARGITSTATUSCOPIED_FG
Foreground color of the {{ StatusCopied }} element.
  • GBTCARGITSTATUSCOPIED_FM
Formatting of the {{ StatusCopied }} element.
  • GBTCARGITSTATUSCOPIED_FORMAT='{{ StatusCopiedSymbol }}'
Format of the the {{ StatusCopied }} element. It can be {{ StatusCopiedSymbol }} or {{ StatusCopiedCount }}.
  • GBTCARGITSTATUSCOPIEDSYMBOLBG
Background color of the {{ StatusCopiedSymbol }} element.
  • GBTCARGITSTATUSCOPIEDSYMBOLFG
Foreground color of the {{ StatusCopiedSymbol }} element.
  • GBTCARGITSTATUSCOPIEDSYMBOLFM
Formatting of the {{ StatusCopiedSymbol }} element.
  • GBTCARGITSTATUSCOPIEDSYMBOLTEXT=' β₯ˆ'
Text content of the {{ StatusCopiedSymbol }} element.
  • GBTCARGITSTATUSCOPIEDCOUNTBG
Background color of the {{ StatusCopiedCount }} element.
  • GBTCARGITSTATUSCOPIEDCOUNTFG
Foreground color of the {{ StatusCopiedCount }} element.
  • GBTCARGITSTATUSCOPIEDCOUNTFM
Formatting of the {{ StatusCopiedSymbol }} element.
  • GBTCARGITSTATUSCOPIEDCOUNTTEXT
Text content of the {{ StatusCopiedCount }} element. By default it contains a number of files copied.
  • GBTCARGITSTATUSDELETED_BG
Background color of the {{ StatusDeleted }} element.
  • GBTCARGITSTATUSDELETED_FG
Foreground color of the {{ StatusDeleted }} element.
  • GBTCARGITSTATUSDELETED_FM
Formatting of the {{ StatusDeleted }} element.
  • GBTCARGITSTATUSDELETED_FORMAT='{{ StatusDeletedSymbol }}'
Format of the the {{ StatusDeleted }} element. It can be {{ StatusDeletedSymbol }} or {{ StatusDeletedCount }}.
  • GBTCARGITSTATUSDELETEDSYMBOLBG
Background color of the {{ StatusDeletedSymbol }} element.
  • GBTCARGITSTATUSDELETEDSYMBOLFG
Foreground color of the {{ StatusDeletedSymbol }} element.
  • GBTCARGITSTATUSDELETEDSYMBOLFM
Formatting of the {{ StatusDeletedSymbol }} element.
  • GBTCARGITSTATUSDELETEDSYMBOLTEXT=' βž–'
Text content of the {{ StatusDeletedSymbol }} element.
  • GBTCARGITSTATUSDELETEDCOUNTBG
Background color of the {{ StatusDeletedCount }} element.
  • GBTCARGITSTATUSDELETEDCOUNTFG
Foreground color of the {{ StatusDeletedCount }} element.
  • GBTCARGITSTATUSDELETEDCOUNTFM
Formatting of the {{ StatusDeletedSymbol }} element.
  • GBTCARGITSTATUSDELETEDCOUNTTEXT
Text content of the {{ StatusDeletedCount }} element. By default it contains a number of deleted files.
  • GBTCARGITSTATUSIGNORED_BG
Background color of the {{ StatusIgnored }} element.
  • GBTCARGITSTATUSIGNORED_FG
Foreground color of the {{ StatusIgnored }} element.
  • GBTCARGITSTATUSIGNORED_FM
Formatting of the {{ StatusIgnored }} element.
  • GBTCARGITSTATUSIGNORED_FORMAT='{{ StatusIgnoredSymbol }}'
Format of the the {{ StatusIgnored }} element. It can be {{ StatusIgnoredSymbol }} or {{ StatusIgnoredCount }}.
  • GBTCARGITSTATUSIGNOREDSYMBOLBG
Background color of the {{ StatusIgnoredSymbol }} element.
  • GBTCARGITSTATUSIGNOREDSYMBOLFG
Foreground color of the {{ StatusIgnoredSymbol }} element.
  • GBTCARGITSTATUSIGNOREDSYMBOLFM
Formatting of the {{ StatusIgnoredSymbol }} element.
  • GBTCARGITSTATUSIGNOREDSYMBOLTEXT=' ⬆'
Text content of the {{ StatusIgnoredSymbol }} element.
  • GBTCARGITSTATUSIGNOREDCOUNTBG
Background color of the {{ StatusIgnoredCount }} element.
  • GBTCARGITSTATUSIGNOREDCOUNTFG
Foreground color of the {{ StatusIgnoredCount }} element.
  • GBTCARGITSTATUSIGNOREDCOUNTFM
Formatting of the {{ StatusIgnoredSymbol }} element.
  • GBTCARGITSTATUSIGNOREDCOUNTTEXT
Text content of the {{ StatusIgnoredCount }} element. By default it contains a number of ignored files.
  • GBTCARGITSTATUSMODIFIED_BG
Background color of the {{ StatusModified }} element.
  • GBTCARGITSTATUSMODIFIED_FG
Foreground color of the {{ StatusModified }} element.
  • GBTCARGITSTATUSMODIFIED_FM
Formatting of the {{ StatusModified }} element.
  • GBTCARGITSTATUSMODIFIED_FORMAT='{{ StatusModifiedSymbol }}'
Format of the the {{ StatusModified }} element. It can be {{ StatusModifiedSymbol }} or {{ StatusModifiedCount }}.
  • GBTCARGITSTATUSMODIFIEDSYMBOLBG
Background color of the {{ StatusModifiedSymbol }} element.
  • GBTCARGITSTATUSMODIFIEDSYMBOLFG
Foreground color of the {{ StatusModifiedSymbol }} element.
  • GBTCARGITSTATUSMODIFIEDSYMBOLFM
Formatting of the {{ StatusModifiedSymbol }} element.
  • GBTCARGITSTATUSMODIFIEDSYMBOLTEXT=' ⬆'
Text content of the {{ StatusModifiedSymbol }} element.
  • GBTCARGITSTATUSMODIFIEDCOUNTBG
Background color of the {{ StatusModifiedCount }} element.
  • GBTCARGITSTATUSMODIFIEDCOUNTFG
Foreground color of the {{ StatusModifiedCount }} element.
  • GBTCARGITSTATUSMODIFIEDCOUNTFM
Formatting of the {{ StatusModifiedSymbol }} element.
  • GBTCARGITSTATUSMODIFIEDCOUNTTEXT
Text content of the {{ StatusModifiedCount }} element. By default it contains a number of modified files.
  • GBTCARGITSTATUSRENAMED_BG
Background color of the {{ StatusRenamed }} element.
  • GBTCARGITSTATUSRENAMED_FG
Foreground color of the {{ StatusRenamed }} element.
  • GBTCARGITSTATUSRENAMED_FM
Formatting of the {{ StatusRenamed }} element.
  • GBTCARGITSTATUSRENAMED_FORMAT='{{ StatusRenamedSymbol }}'
Format of the the {{ StatusRenamed }} element. It can be {{ StatusRenamedSymbol }} or {{ StatusRenamedCount }}.
  • GBTCARGITSTATUSRENAMEDSYMBOLBG
Background color of the {{ StatusRenamedSymbol }} element.
  • GBTCARGITSTATUSRENAMEDSYMBOLFG
Foreground color of the {{ StatusRenamedSymbol }} element.
  • GBTCARGITSTATUSRENAMEDSYMBOLFM
Formatting of the {{ StatusRenamedSymbol }} element.
  • GBTCARGITSTATUSRENAMEDSYMBOLTEXT=' ⬆'
Text content of the {{ StatusRenamedSymbol }} element.
  • GBTCARGITSTATUSRENAMEDCOUNTBG
Background color of the {{ StatusRenamedCount }} element.
  • GBTCARGITSTATUSRENAMEDCOUNTFG
Foreground color of the {{ StatusRenamedCount }} element.
  • GBTCARGITSTATUSRENAMEDCOUNTFM
Formatting of the {{ StatusRenamedSymbol }} element.
  • GBTCARGITSTATUSRENAMEDCOUNTTEXT
Text content of the {{ StatusRenamedCount }} element. By default it contains a number of renamed files.
  • GBTCARGITSTATUSSTAGED_BG
Background color of the {{ StatusStaged }} element.
  • GBTCARGITSTATUSSTAGED_FG
Foreground color of the {{ StatusStaged }} element.
  • GBTCARGITSTATUSSTAGED_FM
Formatting of the {{ StatusStaged }} element.
  • GBTCARGITSTATUSSTAGED_FORMAT='{{ StatusStagedSymbol }}'
Format of the the {{ StatusStaged }} element. It can be {{ StatusStagedSymbol }} or {{ StatusStagedCount }}.
  • GBTCARGITSTATUSSTAGEDSYMBOLBG
Background color of the {{ StatusStagedSymbol }} element.
  • GBTCARGITSTATUSSTAGEDSYMBOLFG
Foreground color of the {{ StatusStagedSymbol }} element.
  • GBTCARGITSTATUSSTAGEDSYMBOLFM
Formatting of the {{ StatusStagedSymbol }} element.
  • GBTCARGITSTATUSSTAGEDSYMBOLTEXT=' ⬆'
Text content of the {{ StatusStagedSymbol }} element.
  • GBTCARGITSTATUSSTAGEDCOUNTBG
Background color of the {{ StatusStagedCount }} element.
  • GBTCARGITSTATUSSTAGEDCOUNTFG
Foreground color of the {{ StatusStagedCount }} element.
  • GBTCARGITSTATUSSTAGEDCOUNTFM
Formatting of the {{ StatusStagedSymbol }} element.
  • GBTCARGITSTATUSSTAGEDCOUNTTEXT
Text content of the {{ StatusStagedCount }} element. By default it contains a number of staged files.
  • GBTCARGITSTATUSUNMERGED_BG
Background color of the {{ StatusUnmerged }} element.
  • GBTCARGITSTATUSUNMERGED_FG
Foreground color of the {{ StatusUnmerged }} element.
  • GBTCARGITSTATUSUNMERGED_FM
Formatting of the {{ StatusUnmerged }} element.
  • GBTCARGITSTATUSUNMERGED_FORMAT='{{ StatusUnmergedSymbol }}'
Format of the the {{ StatusUnmerged }} element. It can be {{ StatusUnmergedSymbol }} or {{ StatusUnmergedCount }}.
  • GBTCARGITSTATUSUNMERGEDSYMBOLBG
Background color of the {{ StatusUnmergedSymbol }} element.
  • GBTCARGITSTATUSUNMERGEDSYMBOLFG
Foreground color of the {{ StatusUnmergedSymbol }} element.
  • GBTCARGITSTATUSUNMERGEDSYMBOLFM
Formatting of the {{ StatusUnmergedSymbol }} element.
  • GBTCARGITSTATUSUNMERGEDSYMBOLTEXT=' ⬆'
Text content of the {{ StatusUnmergedSymbol }} element.
  • GBTCARGITSTATUSUNMERGEDCOUNTBG
Background color of the {{ StatusUnmergedCount }} element.
  • GBTCARGITSTATUSUNMERGEDCOUNTFG
Foreground color of the {{ StatusUnmergedCount }} element.
  • GBTCARGITSTATUSUNMERGEDCOUNTFM
Formatting of the {{ StatusUnmergedSymbol }} element.
  • GBTCARGITSTATUSUNMERGEDCOUNTTEXT
Text content of the {{ StatusUnmergedCount }} element. By default it contains a number of unmerged files.
  • GBTCARGITSTATUSUNTRACKED_BG
Background color of the {{ StatusUntracked }} element.
  • GBTCARGITSTATUSUNTRACKED_FG
Foreground color of the {{ StatusUntracked }} element.
  • GBTCARGITSTATUSUNTRACKED_FM
Formatting of the {{ StatusUntracked }} element.
  • GBTCARGITSTATUSUNTRACKED_FORMAT='{{ StatusUntrackedSymbol }}'
Format of the the {{ StatusUntracked }} element. It can be {{ StatusUntrackedSymbol }} or {{ StatusUntrackedCount }}.
  • GBTCARGITSTATUSUNTRACKEDSYMBOLBG
Background color of the {{ StatusUntrackedSymbol }} element.
  • GBTCARGITSTATUSUNTRACKEDSYMBOLFG
Foreground color of the {{ StatusUntrackedSymbol }} element.
  • GBTCARGITSTATUSUNTRACKEDSYMBOLFM
Formatting of the {{ StatusUntrackedSymbol }} element.
  • GBTCARGITSTATUSUNTRACKEDSYMBOLTEXT=' ⬆'
Text content of the {{ StatusUntrackedSymbol }} element.
  • GBTCARGITSTATUSUNTRACKEDCOUNTBG
Background color of the {{ StatusUntrackedCount }} element.
  • GBTCARGITSTATUSUNTRACKEDCOUNTFG
Foreground color of the {{ StatusUntrackedCount }} element.
  • GBTCARGITSTATUSUNTRACKEDCOUNTFM
Formatting of the {{ StatusUntrackedSymbol }} element.
  • GBTCARGITSTATUSUNTRACKEDCOUNTTEXT
Text content of the {{ StatusUntrackedCount }} element. By default it contains a number of untracked files.
  • GBTCARGITAHEADBG
Background color of the {{ Ahead }} element.
  • GBTCARGITAHEADFG
Foreground color of the {{ Ahead }} element.
  • GBTCARGITAHEADFM
Formatting of the {{ Ahead }} element.
  • GBTCARGITAHEADFORMAT='{{ AheadSymbol }}'
Format of the the {{ Ahead }} element. It can be {{ AheadSymbol }} or {{ AheadCount }}.
  • GBTCARGITAHEADSYMBOL_BG
Background color of the {{ AheadSymbol }} element.
  • GBTCARGITAHEADSYMBOL_FG
Foreground color of the {{ AheadSymbol }} element.
  • GBTCARGITAHEADSYMBOL_FM
Formatting of the {{ AheadSymbol }} element.
  • GBTCARGITAHEADSYMBOL_TEXT=' ⬆'
Text content of the {{ AheadSymbol }} element.
  • GBTCARGITAHEADCOUNT_BG
Background color of the {{ AheadCount }} element.
  • GBTCARGITAHEADCOUNT_FG
Foreground color of the {{ AheadCount }} element.
  • GBTCARGITAHEADCOUNT_FM
Formatting of the {{ AheadSymbol }} element.
  • GBTCARGITAHEADCOUNT_TEXT
Text content of the {{ AheadCount }} element. By default it contains a number of commits ahead of the remote branch.
  • GBTCARGITBEHINDBG
Background color of the {{ Behind }} element.
  • GBTCARGITBEHINDFG
Foreground color of the {{ Behind }} element.
  • GBTCARGITBEHINDFM
Formatting of the {{ Behind }} element.
  • GBTCARGITBEHINDFORMAT='{{ BehindSymbol }}'
Format of the the {{ Behind }} element. It can be {{ BehindSymbol }} or {{ BehindCount }}.
  • GBTCARGITBEHINDSYMBOL_BG
Background color of the {{ BehindSymbol }} element.
  • GBTCARGITBEHINDSYMBOL_FG
Foreground color of the {{ BehindSymbol }} element.
  • GBTCARGITBEHINDSYMBOL_FM
Formatting of the {{ BehindSymbol }} element.
  • GBTCARGITBEHINDSYMBOL_TEXT=' ⬇'
Text content of the {{ BehindSymbol }} element.
  • GBTCARGITBEHINDCOUNT_BG
Background color of the {{ BehindCount }} element.
  • GBTCARGITBEHINDCOUNT_FG
Foreground color of the {{ BehindCount }} element.
  • GBTCARGITBEHINDCOUNT_FM
Formatting of the {{ BehindSymbol }} element.
  • GBTCARGITBEHINDCOUNT_TEXT
Text content of the {{ BehindCount }} element. By default it contains a number of commits ahead of the remote branch.
  • GBTCARGITSTASHBG
Background color of the {{ Stash }} element.
  • GBTCARGITSTASHFG
Foreground color of the {{ Stash }} element.
  • GBTCARGITSTASHFM
Formatting of the {{ Stash }} element.
  • GBTCARGITSTASHFORMAT='{{ StashSymbol }}'
Format of the the {{ Stash }} element. It can be {{ StashSymbol }} or {{ StashCount }}.
  • GBTCARGITSTASHSYMBOL_BG
Background color of the {{ StashSymbol }} element.
  • GBTCARGITSTASHSYMBOL_FG
Foreground color of the {{ StashSymbol }} element.
  • GBTCARGITSTASHSYMBOL_FM
Formatting of the {{ StashSymbol }} element.
  • GBTCARGITSTASHSYMBOL_TEXT=' βš‘'
Text content of the {{ StashSymbol }} element.
  • GBTCARGITSTASHCOUNT_BG
Background color of the {{ StashCount }} element.
  • GBTCARGITSTASHCOUNT_FG
Foreground color of the {{ StashCount }} element.
  • GBTCARGITSTASHCOUNT_FM
Formatting of the {{ StashSymbol }} element.
  • GBTCARGITSTASHCOUNT_TEXT
Text content of the {{ StashCount }} element. By default it contains a number of stashes.
  • GBTCARGIT_DISPLAY
Whether to display this car if it's in the list of cars (GBT_CARS).
  • GBTCARGIT_WRAP='0'
Whether to wrap the prompt line in front of this car.
  • GBTCARGITSEPTEXT
Text content of the separator for this car.
  • GBTCARGITSEPBG
Background color of the separator for this car.
  • GBTCARGITSEPFG
Foreground color of the separator for this car.
  • GBTCARGITSEPFM
Formatting of the separator for this car.

Hostname car

Car that displays username of the currently logged user and the hostname of the local machine.

  • GBTCARHOSTNAMEBG='darkgray'
Background color of the car.
  • GBTCARHOSTNAME_FG='252'
Foreground color of the car.
  • GBTCARHOSTNAME_FM='none'
Formatting of the car.
  • GBTCARHOSTNAME_FORMAT=' {{ UserHost }} '
Format of the car.
  • GBTCARHOSTNAMEUSERHOSTBG
Background color of the {{ UserHost }} element.
  • GBTCARHOSTNAMEUSERHOSTFG
Foreground color of the {{ UserHost }} element.
  • GBTCARHOSTNAMEUSERHOSTFM
Formatting of the {{ UserHost }} element.
  • GBTCARHOSTNAMEUSERHOSTFORMAT
Format of the {{ UserHost }} element. The value is either {{ Admin }}@{{ Host }} if the user is root or {{ User }}@{{ Host }} if the user is a normal user.
  • GBTCARHOSTNAMEADMINBG
Background color of the {{ Admin }} element.
  • GBTCARHOSTNAMEADMINFG
Foreground color of the {{ Admin }} element.
  • GBTCARHOSTNAMEADMINFM
Formatting of the {{ Admin }} element.
  • GBTCARHOSTNAMEADMINTEXT
Text content of the {{ Admin }} element. The user name.
  • GBTCARHOSTNAMEUSERBG
Background color of the {{ User }} element.
  • GBTCARHOSTNAMEUSERFG
Foreground color of the {{ User }} element.
  • GBTCARHOSTNAMEUSERFM
Formatting of the {{ User }} element.
  • GBTCARHOSTNAMEUSERTEXT
Text content of the {{ User }} element. The user name.
  • GBTCARHOSTNAMEHOSTBG
Background color of the {{ Host }} element.
  • GBTCARHOSTNAMEHOSTFG
Foreground color of the {{ Host }} element.
  • GBTCARHOSTNAMEHOSTFM
Formatting of the {{ Host }} element.
  • GBTCARHOSTNAMEHOSTTEXT
Text content of the {{ Host }} element. The host name.
  • GBTCARHOSTNAME_DISPLAY='1'
Whether to display this car if it's in the list of cars (GBT_CARS).
  • GBTCARHOSTNAME_WRAP='0'
Whether to wrap the prompt line in front of this car.
  • GBTCARHOSTNAMESEPTEXT
Text content of the separator for this car.
  • GBTCARHOSTNAMESEPBG
Background color of the separator for this car.
  • GBTCARHOSTNAMESEPFG
Foreground color of the separator for this car.
  • GBTCARHOSTNAMESEPFM
Formatting of the separator for this car.

Kubectl car

Car that displays kubectl information.

  • GBTCARKUBECTL_BG='26'
Background color of the car.
  • GBTCARKUBECTL_FG='white'
Foreground color of the car.
  • GBTCARKUBECTL_FM='none'
Formatting of the car.
  • GBTCARKUBECTL_FORMAT=' {{ Icon }} {{ Context }} '
Format of the car. {{ Cluster }}, {{ AuthInfo }} and {{ Namespace }} can be used here as well.
  • GBTCARKUBECTLICONBG
Background color of the {{ Icon }} element.
  • GBTCARKUBECTLICONFG
Foreground color of the {{ Icon }} element.
  • GBTCARKUBECTLICONFM
Formatting of the {{ Icon }} element.
  • GBTCARKUBECTL_IC
Text content of the {{ Icon }} element.
  • GBTCARKUBECTLCONTEXTBG
Background color of the {{ Context }} element.
  • GBTCARKUBECTLCONTEXTFG
Foreground color of the {{ Context }} element.
  • GBTCARKUBECTLCONTEXTFM
Formatting of the {{ Context }} element.
  • GBTCARKUBECTLCONTEXTTEXT
Text content of the {{ Context }} element.
  • GBTCARKUBECTLCLUSTERBG
Background color of the {{ Cluster }} element.
  • GBTCARKUBECTLCLUSTERFG
Foreground color of the {{ Cluster }} element.
  • GBTCARKUBECTLCLUSTERFM
Formatting of the {{ Cluster }} element.
  • GBTCARKUBECTLCLUSTERTEXT
Text content of the {{ Cluster }} element.
  • GBTCARKUBECTLAUTHINFOBG
Background color of the {{ AuthInfo }} element.
  • GBTCARKUBECTLAUTHINFOFG
Foreground color of the {{ AuthInfo }} element.
  • GBTCARKUBECTLAUTHINFOFM
Formatting of the {{ AuthInfo }} element.
  • GBTCARKUBECTLAUTHINFOTEXT
Text content of the {{ AuthInfo }} element.
  • GBTCARKUBECTLNAMESPACEBG
Background color of the {{ Namespace }} element.
  • GBTCARKUBECTLNAMESPACEFG
Foreground color of the {{ Namespace }} element.
  • GBTCARKUBECTLNAMESPACEFM
Formatting of the {{ Namespace }} element.
  • GBTCARKUBECTLNAMESPACETEXT
Text content of the {{ Namespace }} element.
  • GBTCARKUBECTL_DISPLAY='1'
Whether to display this car if it's in the list of cars (GBT_CARS).
  • GBTCARKUBECTL_WRAP='0'
Whether to wrap the prompt line in front of this car.
  • GBTCARKUBECTLSEPTEXT
Text content of the separator for this car.
  • GBTCARKUBECTLSEPBG
Background color of the separator for this car.
  • GBTCARKUBECTLSEPFG
Foreground color of the separator for this car.
  • GBTCARKUBECTLSEPFM
Formatting of the separator for this car.

Os car

Car that displays icon of the operating system.

  • GBTCAROS_BG='235'
Background color of the car.
  • GBTCAROS_FG='white'
Foreground color of the car.
  • GBTCAROS_FM='none'
Formatting of the car.
  • GBTCAROS_FORMAT=' {{ Symbol }} '
Format of the car.
  • GBTCAROSSYMBOLBG
Background color of the {{ Symbol }} element.
  • GBTCAROSSYMBOLFG
Foreground color of the {{ Symbol }} element.
  • GBTCAROSSYMBOLFM
Formatting of the {{ Symbol }} element.
  • GBTCAROSSYMBOLTEXT
Text content of the {{ Symbol }} element.
  • GBTCAROS_NAME
The name of the symbol to display. Default value is selected by the system the shell runs at. Possible names and their symbols are:

- amzn ο‰° - android ο…» - arch οŒ€ - archarm οŒ€ - centos  - cloud  - coreos  - darwin ξœ‘ - debian οŒ‚ - docker  - elementary οŒ‘ - fedora οŒƒ - freebsd  - gentoo  - linux ξœ’ - linuxmint οŒ„ - mageia οŒ† - mandriva οŒ‡ - opensuse  - raspbian  - redhat οŒ‰ - sabayon οŒ“ - slackware  - ubuntu  - windows 

Example:

export GBTCAROS_NAME='arch'
  • GBTCAROS_DISPLAY='1'
Whether to display this car if it's in the list of cars (GBT_CARS).
  • GBTCAROS_WRAP='0'
Whether to wrap the prompt line in front of this car.
  • GBTCAROSSEPTEXT
Text content of the separator for this car.
  • GBTCAROSSEPBG
Background color of the separator for this car.
  • GBTCAROSSEPFG
Foreground color of the separator for this car.
  • GBTCAROSSEPFM
Formatting of the separator for this car.

PyVirtEnv car

Car that displays Python Virtual Environment name. This car is displayed only if the Python Virtual Environment is activated. The activation script usually prepends the shell prompt by the Virtual Environment name by default. In order to disable it, the following environment variable must be set:

export VIRTUALENVDISABLE_PROMPT='1'

Variables used by the car:

  • GBTCARPYVIRTENV_BG='222'
Background color of the car.
  • GBTCARPYVIRTENV_FG='black'
Foreground color of the car.
  • GBTCARPYVIRTENV_FM='none'
Formatting of the car.
  • GBTCARPYVIRTENV_FORMAT=' {{ Icon }} {{ Name }} '
Format of the car.
  • GBTCARPYVIRTENVICONBG
Background color of the {{ Icon }} element.
  • GBTCARPYVIRTENVICONFG
Foreground color of the {{ Icon }} element.
  • GBTCARPYVIRTENVICONFM
Formatting of the {{ Icon }} element.
  • GBTCARPYVIRTENVICONTEXT
Text content of the {{ Icon }} element.
  • GBTCARPYVIRTENVNAMEBG
Background color of the {{ Name }} element.
  • GBTCARPYVIRTENVNAMEFG='33'
Foreground color of the {{ NAME }} element.
  • GBTCARPYVIRTENVNAMEFM
Formatting of the {{ Name }} element.
  • GBTCARPYVIRTENVNAMETEXT
The name of the Python Virtual Environment deducted from the VIRTUAL_ENV environment variable.
  • GBTCARPYVIRTENV_DISPLAY
Whether to display this car if it's in the list of cars (GBT_CARS).
  • GBTCARPYVIRTENV_WRAP='0'
Whether to wrap the prompt line in front of this car.
  • GBTCARPYVIRTENVSEPTEXT
Text content of the separator for this car.
  • GBTCARPYVIRTENVSEPBG
Background color of the separator for this car.
  • GBTCARPYVIRTENVSEPFG
Foreground color of the separator for this car.
  • GBTCARPYVIRTENVSEPFM
Formatting of the separator for this car.

Sign car

Car that displays prompt character for the admin and user at the end of the train.

  • GBTCARSIGN_BG='default'
Background color of the car.
  • GBTCARSIGN_FG='default'
Foreground color of the car.
  • GBTCARSIGN_FM='none'
Formatting of the car.
  • GBTCARSIGN_FORMAT=' {{ Symbol }} '
Format of the car.
  • GBTCARSIGNSYMBOLBG
Background color of the {{ Symbol }} element.
  • GBTCARSIGNSYMBOLFG
Foreground color of the {{ Symbol }} element.
  • GBTCARSIGNSYMBOLFM='bold'
Formatting of the {{ Symbol }} element.
  • GBTCARSIGNSYMBOLFORMAT
Format of the {{ Symbol }} element. The format is either {{ Admin }} if the UID is 0 or {{ User }} if the UID is not 0.
  • GBTCARSIGNADMINBG
Background color of the {{ Admin }} element.
  • GBTCARSIGNADMINFG='red'
Foreground color of the {{ Admin }} element.
  • GBTCARSIGNADMINFM
Formatting of the {{ Admin }} element.
  • GBTCARSIGNADMINTEXT='#'
Text content of the {{ Admin }} element.
  • GBTCARSIGNUSERBG
Background color of the {{ User }} element.
  • GBTCARSIGNUSERFG='light_green'
Foreground color of the {{ User }} element.
  • GBTCARSIGNUSERFM
Formatting of the {{ User }} element.
  • GBTCARSIGNUSERTEXT='$'
Text content of the {{ User }} element. The user name.
  • GBTCARSIGN_DISPLAY='1'
Whether to display this car if it's in the list of cars (GBT_CARS).
  • GBTCARSIGN_WRAP='0'
Whether to wrap the prompt line in front of this car.
  • GBTCARSIGNSEPTEXT
Text content of the separator for this car.
  • GBTCARSIGNSEPBG
Background color of the separator for this car.
  • GBTCARSIGNSEPFG
Foreground color of the separator for this car.
  • GBTCARSIGNSEPFM
Formatting of the separator for this car.

Status car

Car that visualizes return code of every command. By default, this car is displayed only when the return code is non-zero. If you wa


README truncated. View on GitHub
πŸ”— More in this category

Β© 2026 GitRepoTrend Β· jtyr/gbt Β· Updated daily from GitHub