kubectx
kubectx copied to clipboard
Proposal: Display Message When No kubectl Contexts are Available
This is a request for a very minor detail for kubectx
. The idea would be to display a message to state explicitly that no contexts are available instead of displaying nothing as kubectx
currently does when no contexts are available.
Example
$ kubectx
No kubectl contexts available
Yeah this is doable by printing an info message to stderr. I'll keep in mind.
@ahmetb - May I take a gander at this?
Go for it.
Just edit the file /home/rassakra/Desktop/kubectx/cmd/kubectx/list.go
by adding this code on line 47 :+1:
if( len(ctx) == 0 ) { printer.Warning(stderr, "No kubectl contexts available ") }
and enjoy