ahmetb / kubectl-tree

kubectl plugin to browse Kubernetes object hierarchies as a tree 🎄 (star the repo if you are using)
Apache License 2.0
2.92k stars 118 forks source link

Add --watch support #45

Open howardjohn opened 2 years ago

howardjohn commented 2 years ago

It would be awesome to deploy some big resource (say Knative Service) and then kubectl tree --watch it to see how things get ready.

The alternative would be watch kubectl tree, but then we lose colors. So maybe an alternative would be a way to always have colors, even when not a TTY?

ahmetb commented 2 years ago

We could, but I am not sure if the benefits outweigh the effort to get this done. As you said, the watch command can be an easy hack.

FWIW it's "us" disabling the colors when the command is piped or executed with a stdin that's not a tty. So maybe we can allow something like --force-colors and you can use watch --color.