Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add k8s segment to show context and namespace info #545

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Jul 15, 2023

  1. Add k8s segment to show context and namespace info

    I added this to avoid making mistakes when using multiple contexts, hope
    you find it useful.
    
    Requirements
      kubectx and kubens from https://github.com/ahmetb/kubectx in PATH
    
    Configuration
    
      "k8s": {
        "ltrim": bool,
        "rtrim": bool,
        "symbol": bool,
        "max_context": number,
        "max_namespace": number,
        "colorize": bool,
        "colorize_symbol": bool
      },
    
    ltrim, rtrim: do not add space at left or right (compatibility with some
    theme mods)
    
    symbol: show k8s symbol
    
    max_context, max_namespace: cut with an ellipsis context or namespace,
    use 0 to supress output
    
    colorize, colorize_symbol: auto-colorize based on the information string
    
    Theme
      K8S_FG = 57
      K8S_BG = 7
      K8S_SYMBOL_FG = 57
    3coma3 committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    fd6305a View commit details
    Browse the repository at this point in the history
  2. Cleanup expressions

    3coma3 committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    27faf9e View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2023

  1. Expression cleanup b-ryan#2

    3coma3 committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    bc86f69 View commit details
    Browse the repository at this point in the history