k8s 配置kubecolor高亮显示 SoulChild 收录于 kubernetes 2021-07-01 11:13 约 86 字 预计阅读 1 分钟 - 次阅读 目录 bash配置zsh配置警告本文最后更新于 2022-05-24 11:29,文中内容可能已过时。bash配置1.下载安装1 2 wget https://github.com//dty1er/kubecolor/releases/download/v0.0.20/kubecolor_0.0.20_Linux_x86_64.tar.gz tar xf kubecolor_0.0.20_Linux_x86_64.tar.gz -C /usr/local/bin/ kubecolor 2.修改kubecolor别名为k1 2 3 echo 'source<(kubectl completion bash)' >> ~/.bashrc echo 'command -v kubecolor >/dev/null 2>&1 && alias k="kubecolor"' >> ~/.bashrc echo 'complete -o default -F __start_kubectl k' >> ~/.bashrc 4.使配置生效1 source ~/.bashrc zsh配置1 2 3 4 5 6 7 8 wget https://github.com//dty1er/kubecolor/releases/download/v0.0.20/kubecolor_0.0.20_Linux_x86_64.tar.gz tar xf kubecolor_0.0.20_Linux_x86_64.tar.gz -C /usr/local/bin/ kubecolor cat >> ~/.zshrc <<EOF source <(kubectl completion zsh) complete -o default -F __start_kubectl kubecolor command -v kubecolor >/dev/null 2>&1 && alias k="kubecolor" EOF 请我喝杯水 赞赏 微信号 微信打赏Please enable JavaScript to view the comments powered by giscus.