4 ms·
I love the motivation for this tool. This looks very useful for when you just want to make something easier in an existing shell script, without fully migrating
by daenz 5y ago
I love the motivation for this tool. This looks very useful for when you just want to make something easier in an existing shell script, without fully migrating to Python. If you do want to migrate fully to Python, I encourage people to use sh[0] (disclaimer: author).
One concern that I have is that it could be so useful that now your script is filled with `| pz`, and is launching Python processes at every line . Now you have a tangled hybrid of Bash and Python.
0. https://github.com/amoffat/sh https://github.com/amoffat/sh
- yunruse 5y agoDealing with a lot of `| pz` statements could be pretty quickly solved with eg a `pz` interpreter that can be explicitly given multiple sequences of inputs. That said, it would be amazing if `pz` could take in some input arguments and output the Unixy equivalent if it can find one.
- Klasiaster 5y agoOr pz could be a lightweight wrapper that speaks to a python server or starts a new one if there isn't yet. The server could end after X seconds of not getting new requests.
- LeoPanthera 5y agoThat is a really confusing name, since /bin/sh is the default shell in almost every unix.
- dahart 5y agoThis sh is a python lib, not a unix shell, so can’t be easily confused.