-
Notifications
You must be signed in to change notification settings - Fork 2k
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
psub for long-running commands - fish vs zsh/bash #4751
Comments
The question I have here is why you're using it. Usually the easiest way to get a command to accept data from another is to simply pipe it. So instead of If there really is no way to get mkfifo /tmp/fifo
command2 >/tmp/fifo &
command1 /tmp/fifo which is basically what |
Thanks for the reply @faho! My use case is this: I'm implementing a
A real-world use case would look like this: $ rails server | my_interactive_app The idea is that But then I ran into another challenge, simplified to: $ begin; sleep 10; echo "Some output"; sleep 10; end | true This blocks the entire pipeline for 10 seconds, even though Note: I recognize I don't know much about pipes and might be missing something trivial. Process substitution (on bash/zsh for now) is free of this "lock". tl;drI'm looking for a clean way to:
|
Ah the power of rubberducking :) I think what I really need is this syntax instead: $ my_interactive_app rails server I can have |
I'm trying to use
psub
to feed a long-running process' output into another.To simplify:
With zsh/bash, the
First
line of output is immediately available tocat
.And this is the behavior I'm hoping to achieve:
Is it supported in fish? Am I missing something?
I tried both
psub
andpsub -F
.I'm using fish
2.7.1
.The text was updated successfully, but these errors were encountered: