8000 Pipestatus and command substitutions · Issue #6998 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

Pipestatus and command substitutions #6998

@runiq

Description

@runiq

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 requires fzf --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. Piping fzf into another command gives me no way to get at fzf's exit code.

Is there a way for me to have my cake and eat it too? :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0