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

Pass --style=plain by default when using bat #88

Closed
andersk opened this issue Jul 6, 2022 · 0 comments · Fixed by #91
Closed

Pass --style=plain by default when using bat #88

andersk opened this issue Jul 6, 2022 · 0 comments · Fixed by #91

Comments

@andersk
Copy link
Contributor

andersk commented Jul 6, 2022

I was surprised when a lesspipe.sh upgrade caused less to start showing headers and line numbers like bat.

$ less README.md
───────┬────────────────────────────────────────────────────────────────────────
       │ File: README.md
───────┼────────────────────────────────────────────────────────────────────────
   1   │ # lesspipe.sh, a preprocessor for less
   2   │ 
   3   │ Version: 2.05
   4   │ Author : Wolfgang Friebel [wp.friebel@gmail.com](mailto://wp.friebel@gmail.com)
   5   │ License: GPL
   6   │ 
   7   │ Latest version available as:
   8   │  [zip file on github](https://github.com/wofr06/lesspipe.sh/archive/lesspipe.zip)
   9   │ and the [repository on github](https://github.com/wofr06/lesspipe)

This isn’t what I expect from less, and it breaks things like searching at the beginning of the line (/^License). If I wanted bat’s behavior I would have run bat (which automatically invokes a pager).

When we run bat, should we default to running it with --style=plain? I’m not the first person to want this: #83.

We should also run it with --paging=never since there’s never a reason to launch a second less. (As of sharkdp/bat#560, these two options can be combined and abbreviated to bat -pp.)

andersk added a commit to andersk/lesspipe that referenced this issue Jul 11, 2022
Fixes wofr06#88.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
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 a pull request may close this issue.

1 participant