Bat: Feature: support passing initial commands to pager

Created on 29 Sep 2018  路  3Comments  路  Source: sharkdp/bat

less supports initializing the pager with a passed command. One useful use case is to specify a starting regular expression to search for. For example, when configuring the pager option for Git, search can be configured to hop along commits and files: less -iRFXx2 '+/^(commit|added:|deleted:|modified:|renamed:|stash@\\{[0-9]+\\}:) '. bat supports passing a subcommand but as far as I can tell there's no way to pass options onto the underlying pager. This feature request encapsulates the work required to add command passing functionality from CLI argument to pager.

feature-request question

All 3 comments

Thank you for the feedback.

Isn't this possible with the same method as described in https://github.com/sharkdp/bat#using-a-different-pager?

Thanks @shardp! Sorry for the RTFM! I seem to be having an unrelated issue with the pattern but argument passing works. :+1: :+1:

This just got much easier with v0.8.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomgoren picture tomgoren  路  3Comments

lilyball picture lilyball  路  3Comments

tbsvttr picture tbsvttr  路  3Comments

antoinemadec picture antoinemadec  路  3Comments

issmirnov picture issmirnov  路  3Comments