Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yangpeng committed Oct 13, 2021
1 parent a1cc58f commit c7556ef
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion kubernetes/kubectl高亮输出.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@ $ brew install dty1er/tap/kubecolor
alias kubectl="kubecolor"
```

当 kubecolor 输出 tty 不是标准输出时,它会自动禁用着色。例如,如果您正在运行 `kubecolor get pods > result.txt``kubecolor get pods | grep xxx`,则输出将传递到文件或其它命令,因此不会着色。在这种情况下,您可以通过传递 `--force-colors` 标志来强制 kubecolor 进行着色。
当 kubecolor 输出 tty 不是标准输出时,它会自动禁用着色。例如,如果您正在运行 `kubecolor get pods > result.txt``kubecolor get pods | grep xxx`,则输出将传递到文件或其它命令,因此不会着色。在这种情况下,您可以通过传递 `--force-colors` 标志来强制 kubecolor 进行着色。

> 项目地址:https://github.com/dty1er/kubecolor
## 参考链接

- https://github.com/dty1er/kubecolor

0 comments on commit c7556ef

Please sign in to comment.