xontrib-pipeliner
xontrib-pipeliner copied to clipboard
Piping to ppl does not return on Mac
Trying pipeliner on a Mac and the command never returns.
This does not return:
> echo 1 | ppl 'line'
Neither does this:
> echo 1 | ppl 'line' | cat
> xonfig
+------------------+----------------------+
| xonsh | 0.10.1 |
| Git SHA | 337cf25a |
| Commit Date | Nov 17 15:37:41 2021 |
| Python | 3.9.9 |
| PLY | 3.11 |
| have readline | True |
| prompt toolkit | 3.0.24 |
| shell type | prompt_toolkit |
| history backend | json |
| pygments | 2.11.2 |
| on posix | True |
| on linux | False |
| on darwin | True |
| on windows | False |
| on cygwin | False |
| on msys2 | False |
| is superuser | False |
| default encoding | utf-8 |
| xonsh encoding | utf-8 |
| encoding errors | surrogateescape |
| on jupyter | True |
| jupyter kernel | None |
| xontrib 1 | bashisms |
| xontrib 2 | coreutils |
| xontrib 3 | jedi |
| xontrib 4 | pipeliner |
| xontrib 5 | pyenv |
| xontrib 6 | sh |
| xontrib 7 | vox |
| xontrib 8 | vox_tabcomplete |
| xontrib 9 | voxapi |
+------------------+----------------------+
This looks like a known issue - https://github.com/anki-code/xontrib-pipeliner#ppl-on-macos-multicore-pipelining-freezes-on-end
You can use pl instead of ppl on mac.
Sadly these do not work as well:
> echo 1 | pl 'line'
> echo 1 | pl 'line' | cat
@anki-code Is there a "debug" flag I can run with to see why it freezes?
@anki-code I really like this idea, but this does not work for me. Any idea how to make it work?
May be this is also related to $XONSH_CAPTURE_ALWAYS.
Try to set $XONSH_CAPTURE_ALWAYS = True before usage.
@amitkot pl is a callable alias:
https://github.com/anki-code/xontrib-pipeliner/blob/022071c86685746e6b6ccc64199fc1b9a36dff39/xontrib/pipeliner/init.py#L9-L38
So as a good start you can just debug this function on mac.