Skip to content

Piping in and out #8

@elshize

Description

@elshize

Problem

Currently, piping in and out does not work correctly:

  • redirecting from stdin (cat <file> | peek s) causes errors,
  • redirecting output to another program (peek s <file> | less) can cause an error when the program stops working before writing the whole output (e.g., we quit less before reaching the end of the file).

Expected behavior

Both cases described above need to be fixed in the following way.

Redirecting from stdin

The following cases should work:

cat <file> | peek <format>
cat <file> | peek <format> -
cat <file> | peek <format1><format2> - <another_file>

Redirecting to an external program

Eliminate BrokenPipeError whenever the following (or similar) command is interrupted before the end of the file is reached.

peek <format> <file> | less

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions