nix/modules/home-manager/scripts/common/bin/kubeline
2023-10-05 13:43:28 -05:00

9 lines
224 B
Bash
Executable file

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