-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Pipestatus and command substitutions #6998
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
Comments
Wait, what is the use of Anyway you can get exit status of the individual commands in the pipe with the |
The problem with $pipestatus here is that it doesn't work with command substitutions and set -l res (fzf --print0 | string split0)
echo $pipestatus will print just the status of |
fzf
in fzf --print0 | string split0
?
Also fixed by #6820
|
fish version 3.0.2.
I'd like to split the output of
fzf --print0
(which writes NUL-delimited output) on NUL bytes and write it into a variable. As far as I'm aware, that requiresfzf --print0 | string split0
, otherwise all output after the first NUL byte will be cut off.However,
fzf
also returns a meaningful exit code if it was aborted, and I'd like to do something with that exit code. Pipingfzf
into another command gives me no way to get atfzf
's exit code.Is there a way for me to have my cake and eat it too? :)
The text was updated successfully, but these errors were encountered: