cw icon indicating copy to clipboard operation
cw copied to clipboard

Pipes Not Working

Open allcentury opened this issue 3 years ago • 1 comments

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:

  1. Which command echo 'some-group' | cw tail -f. I've also tried cat on a file where groups are row delimited, same story.
  2. 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

allcentury avatar Jan 21 '22 00:01 allcentury

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' ' ')

allcentury avatar Jan 21 '22 18:01 allcentury