Skip to content

Conversation

@majiayu000
Copy link

Fixes #485

Changes

  • Add | key binding to pipe buffer content to external command (similar to less)
  • New input mode for entering pipe command
  • Suspend screen during command execution, resume after completion
  • Support for both plain and formatted export modes

Add the ability to pipe the current buffer content to an external command,
similar to the less command's '|' functionality. This is useful for
processing viewed content with external tools like grep, awk, or any
shell command.

- Add actionPipeBuffer action bound to '|' key
- Add PipeBuffer input mode for command entry
- Add pipe.go with buffer export to command stdin
- Show command output and wait for key before resuming

Fixes noborus#485

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: majiayu000 <[email protected]>
@noborus
Copy link
Owner

noborus commented Dec 31, 2025

Thank you for the pull request.
I'll consider it.

@majiayu000
Copy link
Author

Happy to help : )

@noborus
Copy link
Owner

noborus commented Jan 1, 2026

I think it would be good to merge #944.
However, how frequently do you expect this feature to be used?
Depending on that, I would like to consider whether to set the default key binding to the '|' key.

@noborus
Copy link
Owner

noborus commented Jan 4, 2026

What do you think about the idea of ​​outputting the pipe output as a new document?
It can be used like filter using an external command.

@majiayu000
Copy link
Author

Follow-up PR opened to address feedback about making pipe output a new document and avoiding a default '|' binding: #945

@noborus
Copy link
Owner

noborus commented Jan 4, 2026

I don't want the specifications to be finalized yet, but rather I want to decide on them based on how they will be used.
It will be difficult to accept additional features until that is decided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request? Pipe buffer into other program

2 participants