Created
March 31, 2025 21:12
-
-
Save thbkrkr/8676bca9d3bf90753e709146feacaf8e to your computer and use it in GitHub Desktop.
tsh ktsh aliases to use separate kube config file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#> grep KUBECONFIG ~/.myzshrc | |
alias tsh='KUBECONFIG=~/.kube/tsh-config /opt/homebrew/bin/tsh' | |
alias ktsh='export KUBECONFIG=~/.kube/tsh-config' | |
#> grep -A2 -B1 k8s ~/.oh-my-zsh/themes/pure-thb.zsh-theme | |
# show [k8s:<name>] | |
part1="" | |
if [[ "${KUBECONFIG:-}" != "" ]]; then | |
kctx="$(grep current-context ${KUBECONFIG} | cut -d ' ' -f2)" | |
part1="[%F{red}k8s%f:%F{cyan}$kctx%f] " | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment