cw
cw copied to clipboard
Pipes Not Working
Describe the bug
Great project, thanks @lucagrulla. I'm not able to get pipes to work and I'm unclear what I'm doing wrong. Ideally, what I want to do is:
cw ls groups | grep 'somestr' | cw tail -f
However, trying any trivial pipe commands from the readme results in:
cw: error: expected "<groupName[:logStreamPrefix]> ..."
To Reproduce Steps to reproduce the behavior:
- Which command
echo 'some-group' | cw tail -f
. I've also tried cat on a file where groups are row delimited, same story. - Which flags/arguments are used
-f
and pipes
Expected behavior I can't get any variation of pipes to work.
Desktop (please complete the following information):
- OS: [e.g. MacOS 10.14.2] - osx 11.6.2
- Terminal (bash, zsh) - tried zsh and bash
- cw version 4.1.1
Digging into this some more, I think this might be upstream in Kong because it fails before ever getting to this line. I can't seem to tell where that validation happens though (not a Kong or Go expert).
Interesting that cmd substitution works just fine:
cw tail -f $(cw ls groups | grep 'mystr' | tr '\n' ' ')