summary refs log tree commit diff stats
path: root/zsh/.config
diff options
context:
space:
mode:
authorAlan Pearce2019-05-07 17:15:17 +0200
committerAlan Pearce2019-05-07 17:15:17 +0200
commit3d0a3b8e986f712ad100f57ae196ad824fc6cdde (patch)
tree4c7ee9d47a89ba55c16e3d33f4c54abbe3be08e9 /zsh/.config
parentcc478633ea86ab6f7082f7b0f54f2fd9d4f44f8d (diff)
downloaddotfiles-3d0a3b8e986f712ad100f57ae196ad824fc6cdde.tar.lz
dotfiles-3d0a3b8e986f712ad100f57ae196ad824fc6cdde.tar.zst
dotfiles-3d0a3b8e986f712ad100f57ae196ad824fc6cdde.zip
zsh: lowercase git branch for kubernetes commands
Diffstat (limited to 'zsh/.config')
-rw-r--r--zsh/.config/zsh/.zshrc2
1 files changed, 1 insertions, 1 deletions
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