Hacker News new | past | comments | ask | show | jobs | submit login

The fish[1] shell also has process substitution (without requiring additional syntax) in the form of psub (which is implemented simply as a fish function; see `type psub` from a fish shell):

  bash$ wc <(grep script /usr/share/dict/linux.words)
  fish$ wc (grep script /usr/share/dict/linux.words | psub)
The sugar in the bash form might be nice, but it isn't required.

[1]: http://fishshell.com/




One thing it seems to be missing is the bash

    >(wc)
which is obviously only useful with a few things like tee, but still useful.

dag from GitHub came up with[0] a quick way of using psub:

    bind \es 'commandline -ij "(|psub)"; commandline -f backward-word backward-word'
[0]: https://github.com/fish-shell/fish-shell/issues/719#issuecom...


Thanks for that, process substitution is one of the things I occasionally drop down to bash for.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: