kube_prompt_info

command module
v0.0.0-...-9eccb05 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2018 License: MIT Imports: 6 Imported by: 0

README

kube_prompt_info

Like git_prompt_info of oh-my-zsh, outputs current context and namespace info of kubectl in prompt format.

Installation

$ go get github.com/yuya-takeyama/kube_prompt_info

Setup

zsh

Embed $(kube_prompt_info) in the $PROMPT variable.

e.g. Append these lines in ~/.zshrc:

PROMPT='%m:%c $(kube_prompt_info) %(!.#.$) '

export KUBE_PROMPT_INFO_PREFIX="%{$fg[yellow]%}("
export KUBE_PROMPT_INFO_SUFFIX=")%{$reset_color%}"

Result: Prompt

Environment Variables

  • KUBE_PROMPT_INFO_PREFIX
    • Prefix of the output
  • KUBE_PROMPT_INFO_SUFFIX
    • Suffix of the output
  • KUBE_PROMPT_INFO_DEBUG
    • If a value is set, it outputs error message when something is wrong

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL