浏览代码

fix(kubectx): k8s contexts with spaces (#12191)

lutra 3 月之前
父节点
当前提交
69b0dfeadf
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/kubectx/kubectx.plugin.zsh

+ 1 - 1
plugins/kubectx/kubectx.plugin.zsh

@@ -9,5 +9,5 @@ function kubectx_prompt_info() {
 
 
   # use value in associative array if it exists
   # use value in associative array if it exists
   # otherwise fall back to the context name
   # otherwise fall back to the context name
-  echo "${kubectx_mapping[$current_ctx]:-${current_ctx:gs/%/%%}}"
+  echo "${kubectx_mapping[\"$current_ctx\"]:-${current_ctx:gs/%/%%}}"
 }
 }