Skip to content
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

Piping in and out #8

Open
elshize opened this issue Jan 28, 2017 · 1 comment
Open

Piping in and out #8

elshize opened this issue Jan 28, 2017 · 1 comment
Labels
Milestone

Comments

@elshize
Copy link
Collaborator

elshize commented Jan 28, 2017

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
@elshize elshize added the bug label Jan 28, 2017
@elshize elshize added this to the 1.0 milestone Jan 28, 2017
@elshize
Copy link
Collaborator Author

elshize commented Jan 28, 2017

Make sure to add integration tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant