Skip to content
This repository was archived by the owner on Nov 29, 2024. It is now read-only.
This repository was archived by the owner on Nov 29, 2024. It is now read-only.

Process redirected input as a file #62

@arthurbacci

Description

@arthurbacci

The command curl https://idk/a.tar.gz | byteblitz a.tar.gz should firstly check if a.tar.gz exists. If it does, exit with an error, otherwise, write the input to the file and open it normally. Since stdin is now curl's output, for the user to be able to edit the file, the program needs to open the input of the terminal. This can be done by opening /dev/tty (since SUSv1). Checking if the input is a pipe can be done with this trait from rust's std.

Also, it should behave correctly when used alongside #15, as in curl https://idk/a.tar.gz | byteblitz hex /tmp/deletelater.tar.gz > hexadecimal.txt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions