New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is Fish's psub so simple and effective compared to other shells? #2867
Comments
it is a mystery I suspect it would be helpful if we could see the implementation of fish.psub.sh, as the FIFO implementation in fish doesn't actually a) work or b) get effectively used (see #1040). |
In
But, in a non-Fish shell, this would just block until output was sent to the named pipe from somewhere else. In Fish, "it just works". (But, as @zanchey pointed out, it's not perfect.) |
"it is a mystery" is good enough for me. In case anyone is curious how Fish's process substitution can be implemented in other shells, there is this discussion (specific to It's a lot trickier compared to Fish. One more way Fish stands out from the crowd. |
FYI, the |
@zanchey Thanks for correcting me. Apologies for making you repeat yourself. When do the temp. files |
After the pipe is closed - see the |
Is this a unique feature to Fish? ( |
The
psub
function works great for my needs. The implementation is simple and quite elegant.Fish's psub essence from: https://github.com/fish-shell/fish-shell/blob/master/share/functions/psub.fish#L49
However, a non-Fish equivalent would not work. This would block in other POSIX-y shells:
How does Fish get away with implementing process substitution like that?
The text was updated successfully, but these errors were encountered: