noborus / ov

🎑Feature-rich terminal-based text viewer. It is a so-called terminal pager.
https://noborus.github.io/ov
MIT License
1.45k stars 38 forks source link

Piping ov to ov breaks commands and terminal #634

Open KapJI opened 3 days ago

KapJI commented 3 days ago

Repro

> ov file | ov

Then type /private.

Expected behaviour: private is searched. First ov prints output to stdout and doesn't affect the next call. Actual behaviour: Mode selection menu appears when p is pressed. Unable to exit with q, terminal session is corrupted. It seems both processes are reading commands and interfering with each other.

Without piping it works fine.

Why I need to pass ov to ov?

I have some tools which are configured to use ov by default, e.g. I want this: delta --help | bat -l help. less handles such case fine.

Info

> ov --version
ov version 0.36.0 rev:d671c94

Platforms: MacOS, Linux

noborus commented 2 days ago

Thank you for Issue.

This is certainly a problem. I want to redirect the ov while displaying it on the screen, but if it starts twice, there will be problems.