1 2 3
#!/bin/sh ctx="$(nu --commands "open ${KUBECONFIG:-$HOME/.kube/config} | from yaml | get contexts.name | to text" | $PICKER)" [ -z "$ctx" ] || kubectl config use-context "$ctx"