Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vanishing headers #55

Open
duglin opened this issue Feb 8, 2019 · 2 comments
Open

Vanishing headers #55

duglin opened this issue Feb 8, 2019 · 2 comments

Comments

@duglin
Copy link

duglin commented Feb 8, 2019

$ 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.

@cppforlife
Copy link
Owner

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.

@duglin
Copy link
Author

duglin commented Feb 14, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants