Actualiser p10k.zsh
Ajout du context docker avec prompt_docker
This commit is contained in:
parent
5b35ce7aca
commit
2a6f07b065
13
p10k.zsh
13
p10k.zsh
@ -78,6 +78,7 @@
|
|||||||
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
|
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
|
||||||
haskell_stack # haskell version from stack (https://haskellstack.org/)
|
haskell_stack # haskell version from stack (https://haskellstack.org/)
|
||||||
kubecontext # current kubernetes context (https://kubernetes.io/)
|
kubecontext # current kubernetes context (https://kubernetes.io/)
|
||||||
|
docker # current docker context
|
||||||
terraform # terraform workspace (https://www.terraform.io)
|
terraform # terraform workspace (https://www.terraform.io)
|
||||||
# terraform_version # terraform version (https://www.terraform.io)
|
# terraform_version # terraform version (https://www.terraform.io)
|
||||||
aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
|
aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
|
||||||
@ -187,6 +188,18 @@
|
|||||||
# Left prompt terminator for lines without any segments.
|
# Left prompt terminator for lines without any segments.
|
||||||
typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=
|
typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=
|
||||||
|
|
||||||
|
#################################[ prompt_docker: docker context ]##################################
|
||||||
|
# Prompt personnalisé pour Docker
|
||||||
|
function prompt_docker() {
|
||||||
|
local context=$(docker context show)
|
||||||
|
if [[ "$context" != "default" ]]; then
|
||||||
|
p10k segment -f 208 -t "%F{cyan} :$context%f"
|
||||||
|
elif docker info &>/dev/null; then
|
||||||
|
p10k segment -f 208 -t "%F{cyan}%f"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
typeset -g POWERLEVEL9K_DOCKER_SHOW_ON_COMMAND='docker'
|
||||||
|
|
||||||
#################################[ os_icon: os identifier ]##################################
|
#################################[ os_icon: os identifier ]##################################
|
||||||
# OS identifier color.
|
# OS identifier color.
|
||||||
typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=255
|
typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=255
|
||||||
|
Loading…
x
Reference in New Issue
Block a user