Closed decklin closed 9 years ago
Ahh, I never thought of that! As soon as I read your description, I knew what was happening. I'd just never bothered to try multiple selectas in a pipeline. Give master a try and I bet it'll work. (If you're not running selecta from master currently, you can just check it out and run the selecta
script directly without setting anything up.)
Awesome, it works now. Thanks!
No problem, thanks for the clear report. :)
I'd like to wire up more than one selecta in a pipeline. Here's a contrived example:
So, I would use the first selecta to pick a letter, then output that to another script which generates more choices, and use the second selecta to pick a word from those. (In reality, these would be network queries or something else non-trivial.)
The first selecta works normally, but the second one does not. The list of choices doesn't update until I press enter, and then pressing enter repeatedly causes the cursor to quickly jump to the highlighted word and back to the input line, without exiting. I can press ^C to exit without any output, but that's it.
I'm guessing this has to do with how the TTY is reopened after stdin/stdout have already been redirected by the pipeline, but I don't know enough about how that works.