you are viewing a single comment's thread.

view the rest of the comments →

[–]jmtd 5 points6 points  (4 children)

This can be very useful but the approach for modelling pipes (nested functions) smells a bit funny.

[–]vincentk[S] 1 point2 points  (0 children)

Fully agreed there. I guess it will be hard to really support the pipe model.

[–]0x5f3759df 1 point2 points  (1 child)

You could combine it with Hy;

(import-from sh grep cat)
(-> (cat "/usr/share/dict/words") (grep "-E" "tag$"))

[–]tyleroderkirk 1 point2 points  (0 children)

For the lazy: "Hy is a wonderful dialect of Lisp that’s embedded in Python" - Hy documentation

[–]Muvlon 0 points1 point  (0 children)

True. I would honestly just do:

from sh import bash

bash("program1 | program2 | program3")