Skip to content

Instantly share code, notes, and snippets.

@rfay
Last active December 19, 2016 17:05
Show Gist options
  • Select an option

  • Save rfay/0a48d17046d28072d0b30cebf9a8c359 to your computer and use it in GitHub Desktop.

Select an option

Save rfay/0a48d17046d28072d0b30cebf9a8c359 to your computer and use it in GitHub Desktop.
Iterm2 badge config for kube config info

Iterm2 Badge config: \(session.username)@\(session.hostname)\n\(user.kube_context)

Addition to .bashrc (or whatever runs on new shell):

function iterm2_print_user_vars() {
  iterm2_set_user_var kube_context $(kubectl config current-context 2>/dev/null)
}

iterm2 config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment