From 3d0a3b8e986f712ad100f57ae196ad824fc6cdde Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 7 May 2019 17:15:17 +0200 Subject: zsh: lowercase git branch for kubernetes commands --- zsh/.config/zsh/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index ce28d65..32d151f 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -218,7 +218,7 @@ else 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 -- cgit 1.4.1