all repos — nixfiles @ 3d0a3b8e986f712ad100f57ae196ad824fc6cdde

System and user configuration, managed by nix and home-manager

zsh: lowercase git branch for kubernetes commands

Alan Pearce
commit

3d0a3b8e986f712ad100f57ae196ad824fc6cdde

parent

cc478633ea86ab6f7082f7b0f54f2fd9d4f44f8d

1 file changed, 1 insertion(+), 1 deletion(-)

jump to
M zsh/.config/zsh/.zshrczsh/.config/zsh/.zshrc
@@ -218,7 +218,7 @@
check_kubectl_context () { if [[ "$PWD" =~ /kubernetes ]] then - git_branch=$(git rev-parse --abbrev-ref HEAD) + git_branch=$(git rev-parse --abbrev-ref HEAD | tr '[:upper:]' '[:lower:]') kubectl_context=$(kubectl config current-context) kubectl_namespace=$(kubectl config view -o jsonpath="{.contexts[?(@.name==\"${kubectl_context}\")].context.namespace}") case $git_branch in