gbt: Missing kubectl info and extra space on the left
Heya, gbt looks awesome, and I got to look almost perfectly as my spaceship theme from ohmyzsh, buuuut, gbt loads wayyyyy faster than spaceship.
I’m still running into two issues:
- kubectl information not showing
- there is an extra space on the left that I cant seem to be able to get rid of
➜ # really slow spaceship theme
~ on 🐳 v18.06.1-ce at ☸️ minikube
➜ # load gbt
~ on 🐳 v18.06.1-ce at ☸️ minikube
➜ source ~/.dotfiles/zshrc/gbt.sh
~
➜ # where is my kubectl?
~
➜ env | rg GBT
GBT_CAR_DIR_DEPTH=9999
GBT_CARS=Dir, Git, Kubectl, Status
GBT_RCARS=Git
GBT_SEPARATOR=
GBT_CAR_BG=default
GBT_BEGINNING_TEXT=
GBT_CAR_DIR_FG=cyan
GBT_CAR_GIT_FG=magenta
GBT_CAR_GIT_DIRTY_FG=red
GBT_CAR_GIT_CLEAN_FG=green
GBT_CAR_GIT_SEP=on
GBT_CAR_STATUS_DISPLAY=1
GBT_CAR_STATUS_ERROR_FG=red
GBT_CAR_STATUS_ERROR_BG=default
GBT_CAR_STATUS_OK_FG=green
GBT_CAR_STATUS_OK_BG=default
GBT_CAR_STATUS_WRAP=1
GBT_CAR_STATUS_ERROR_TEXT=➜
GBT_CAR_STATUS_OK_TEXT=➜
GBT_CAR_KUBECTL_BG=26
GBT_CAR_KUBECTL_FG=white
GBT_CAR_KUBECTL_FM=none
GBT_CAR_KUBECTL_FORMAT= {{ Icon }} {{ Context }}
GBT_CAR_KUBECTL_ICON_TEXT=⎈
~
➜
notice that right after I load gbt I immediately get an extra space to the left… maybe its just Monday and I need more coffee 😄
here is the .sh file I’m loading there (all the kubectl stuff at the bottom was added so I could try fiddling with the settings.
# enable GBT
PROMPT='$(gbt $?)'
# show "infinite" dir depth
export GBT_CAR_DIR_DEPTH='9999'
# ExecTime
export GBT_CARS='Dir, Git, Kubectl, Status'
export GBT_RCARS='Git'
export GBT_SEPARATOR=""
export GBT_CAR_BG="default"
export GBT_BEGINNING_TEXT=""
export GBT_CAR_DIR_FG="cyan"
export GBT_CAR_GIT_FG="magenta"
export GBT_CAR_GIT_DIRTY_FG="red"
export GBT_CAR_GIT_CLEAN_FG="green"
export GBT_CAR_GIT_SEP="on"
# export GBT_CAR_EXECTIME_FG="green"
# export GBT_CAR_EXECTIME_SEP="took"
# export GBT_CAR_EXECTIME_PRECISION="0"
export GBT_CAR_STATUS_DISPLAY='1'
export GBT_CAR_STATUS_ERROR_FG="red"
export GBT_CAR_STATUS_ERROR_BG="default"
export GBT_CAR_STATUS_OK_FG="green"
export GBT_CAR_STATUS_OK_BG="default"
export GBT_CAR_STATUS_WRAP=1
export GBT_CAR_STATUS_ERROR_TEXT='➜'
export GBT_CAR_STATUS_OK_TEXT='➜'
export GBT_CAR_STATUS_WRAP=1
# Background color of the car.
export GBT_CAR_KUBECTL_BG='26'
# Foreground color of the car.
export GBT_CAR_KUBECTL_FG='white'
# Formatting of the car.
export GBT_CAR_KUBECTL_FM='none'
# Format of the car. {{ Cluster }}, {{ AuthInfo }} and {{ Namespace }} can be used here as well.
export GBT_CAR_KUBECTL_FORMAT=' {{ Icon }} {{ Context }} '
# Background color of the {{ Icon }} element.
export GBT_CAR_KUBECTL_ICON_BG
# Foreground color of the {{ Icon }} element.
export GBT_CAR_KUBECTL_ICON_FG
# Formatting of the {{ Icon }} element.
export GBT_CAR_KUBECTL_ICON_FM
# Text content of the {{ Icon }} element.
export GBT_CAR_KUBECTL_ICON_TEXT='⎈'
# Background color of the {{ Context }} element.
export GBT_CAR_KUBECTL_CONTEXT_BG
# Foreground color of the {{ Context }} element.
export GBT_CAR_KUBECTL_CONTEXT_FG
# Formatting of the {{ Context }} element.
export GBT_CAR_KUBECTL_CONTEXT_FM
# Text content of the {{ Context }} element.
export GBT_CAR_KUBECTL_CONTEXT_TEXT
# Background color of the {{ Cluster }} element.
export GBT_CAR_KUBECTL_CLUSTER_BG
# Foreground color of the {{ Cluster }} element.
export GBT_CAR_KUBECTL_CLUSTER_FG
# Formatting of the {{ Cluster }} element.
export GBT_CAR_KUBECTL_CLUSTER_FM
# Text content of the {{ Cluster }} element.
export GBT_CAR_KUBECTL_CLUSTER_TEXT
# Background color of the {{ AuthInfo }} element.
export GBT_CAR_KUBECTL_AUTHINFO_BG
# Foreground color of the {{ AuthInfo }} element.
export GBT_CAR_KUBECTL_AUTHINFO_FG
# Formatting of the {{ AuthInfo }} element.
export GBT_CAR_KUBECTL_AUTHINFO_FM
# Text content of the {{ AuthInfo }} element.
export GBT_CAR_KUBECTL_AUTHINFO_TEXT
# Background color of the {{ Namespace }} element.
export GBT_CAR_KUBECTL_NAMESPACE_BG
# Foreground color of the {{ Namespace }} element.
export GBT_CAR_KUBECTL_NAMESPACE_FG
# Formatting of the {{ Namespace }} element.
export GBT_CAR_KUBECTL_NAMESPACE_FMT
# Text content of the {{ Namespace }} element.
export GBT_CAR_KUBECTL_NAMESPACE_TEXT
Setting GBT_DEBUG=‘1’ didn’t give me any extra output… 😦
Hope you can shed some light on what I’m doing wrong
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (9 by maintainers)
thanks for all the help, will use gbt-git for now 😃