This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/common/bin/kubeline

10 lines
224 B
Plaintext
Raw Permalink Normal View History

#!/usr/bin/env sh
c="$(kubectl config current-context | tr -d "\n")"
if [ -n "$c" ]; then
2022-12-13 13:41:40 -06:00
printf "%s" "$c"
fi
a="$(kubectl config view --minify --output 'jsonpath={..namespace}')"
if [ -n "$a" ]; then
printf ".%s" "$a"
fi