Skip to content

Feature request: allow preprocessing the output #798

@visrosa

Description

@visrosa

This might be outside the scope of this software, but it would be useful to set custom tools to run on the output before display by ov, ideally tied to view modes.

Colored output (and preprocessing in general) can already be achieved by common pipes, e.g. pygmentize file | ov, or by using something like bat that calls ov as a pager.

But being able to tell ov itself to run those has three advantages I can see:

  1. ov remains aware of the file it is displaying rather than just saying "stdin"
  2. when using ov --exec it would allow for coloring the ouput while still maintaining separate stdin and stderr
  3. allows the user to set up custom preprocessing for edge cases, such as the small edits necessary to get fstab displaying nicely as a table I described in About column mode behavior #269

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions