Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
How do I filter by namespace in 'invoke --list | grep'? #419
Hi, if I use
This is my output
As you can see it shows only 3 words of every description. There's any workaround for this? Thank you.
changed the title from
How do I filter by namespace using 'invoke --list | grep'?
How do I filter by namespace in 'invoke --list | grep'?
Jan 14, 2017
Wow, that's bizarre, but I can reproduce it on my end too. Thanks for the report!
I'm guessing it's to do with the logic around wrapping/truncating to local terminal size, combined with shell pipes masking the running pty (so it's probably using the default parameters which IIRC is 80x24).
What's odd is that in normal usage, if one has a very small terminal, that code is supposed to be either line-wrapping or truncating with an ellipses, neither of which is occurring here. So that may be a corner case bug.
As an example, here's Invoke's own tasks file, in an 80-col terminal pane:
Note how it wraps. (IIRC we're using
On a wider terminal, with a pipe to grep:
Actually, in my case, it's simply an artifact of the fact that grep doesn't see the wrapped lines! Duh. If one does e.g.
So question is, what's happening in @Zeioth's situation? I think I'd need a copy of the offending tasks file in order to truly reproduce. Occam's razor states it's the same thing: the lines are wrapping, and grep is of course unable to tell that wrapped lines "belong" together.
EDIT: I doublechecked and the posted output in the OP is only about 50ish chars wide, so that is still pretty odd (I'd expect truncation at 80, as noted above). Need more info either way.