Vanishing headers
duglin opened this issue · 2 comments
$ knctl route list
Routes in namespace 'default'
Name Domain Traffic Annotations Conditions Age
fib-knative fib-knative.default.mycluster3.us-south.containers.appdomain.cloud 50% -> fib-knative-00003 - 3 OK / 3 10m
50% -> fib-knative-00002
1 routes
Succeeded
$ knctl route list | more
fib-knative fib-knative.default.mycluster3.us-south.containers.appdomain.cloud 50% -> fib-knative-00003 - 3 OK / 3 10
m
50% -> fib-knative-00002
$ knctl route list > a
$ cat a
fib-knative fib-knative.default.mycluster3.us-south.containers.appdomain.cloud 50% -> fib-knative-00003 - 3 OK / 3 10
m
50% -> fib-knative-00002
Why are headers removed when the output is to a pipe or a file? This makes it really hard for me when I need to wrap the command with other tooling, or even just save the output. The output should not change based on where the output is going. If people want something w/o headers then let them ask for it via a flag.
Yes there's a --tty but I shouldn't have to do that to get the commands "normal" output to remain unchanged just because I'm sending it to a file.
Why are headers removed when the output is to a pipe or a file
this was done for easier grep-ability. grep-ing for things is a fairly common operation during regular dev workflow that would be hindered by having to add extra flags every time.
I get that, but then if people want the output that would normally be produced to be "more grep-able" then they should ask for it via a flag. By default "foo" and "foo > out" should produce the exact same output. IMO it's backwards to have to use a flag to ask for "untouched" output - which is what --tty
is doing.