diff options
author | Alan Pearce | 2019-05-07 17:15:17 +0200 |
---|---|---|
committer | Alan Pearce | 2019-05-07 17:15:17 +0200 |
commit | 3d0a3b8e986f712ad100f57ae196ad824fc6cdde (patch) | |
tree | 4c7ee9d47a89ba55c16e3d33f4c54abbe3be08e9 | |
parent | cc478633ea86ab6f7082f7b0f54f2fd9d4f44f8d (diff) | |
download | nixfiles-3d0a3b8e986f712ad100f57ae196ad824fc6cdde.tar.lz nixfiles-3d0a3b8e986f712ad100f57ae196ad824fc6cdde.tar.zst nixfiles-3d0a3b8e986f712ad100f57ae196ad824fc6cdde.zip |
zsh: lowercase git branch for kubernetes commands
-rw-r--r-- | zsh/.config/zsh/.zshrc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index ce28d654..32d151f9 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 |