You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I firstly wanted to thank you for this very useful project. I use it all the time and it's really streamlined my workflow in a lot of ways.
Problem
I also wanted to report an issue when using the -J option in less. This option "Displays a status column at the left edge of the screen." I find this useful when searching in a document since it adds a * icon to any line with a search result. The problem that I'm having is that this makes the terminal slightly wider than bat expects, and leads to every document that is opened to be just a few characters too wide for the screen.
This issue was brought up to bat a while back (sharkdp/bat#376), which resulted in the addition of the --terminal-width option. This works great with bat by doing something like bat --terminal-width=-3. The problem when using batpipe, though, is that the --terminal-width option is overridden and not passed on to bat (see here).
I'm not sure why this behavior exists in batpipe, but I assume there's a reason. I was wondering if this could be updated to account for the --terminal-width option somehow and pass it on to bat when present.
Proposed Solution
I was thinking that an environment variable (e.g. BATPIPE_TERM_WIDTH or whatever) could be introduced to adjust the term width. When present, it would adjust the number passed to --terminal-width.
If there's a different preferred approach, though, just let me know. Either way, I'm happy to send a PR to fix this once I hear if this fix would be welcome.
Thank you!
The text was updated successfully, but these errors were encountered:
wren
added a commit
to wren/dotfiles
that referenced
this issue
Sep 21, 2022
This breaks with batpipe at the moment (the screen is always a few
characters too wide). Disabling this until the issue below is resolved
in batpipe.
eth-p/bat-extras#81
Thanks for the suggestion! I originally created this project for my own workflow-related reasons, and it's always nice to hear that it's helped others too :)
I implemented your suggestion in 4e2bd77. I tested it locally with less -J and it seemed to work as intended, but please let me know if you encounter any issues with it. A new release should be coming soon-ish, after I've read through all the issues and PRs that I've been behind on.
Hi! I firstly wanted to thank you for this very useful project. I use it all the time and it's really streamlined my workflow in a lot of ways.
Problem
I also wanted to report an issue when using the
-J
option inless
. This option "Displays a status column at the left edge of the screen." I find this useful when searching in a document since it adds a*
icon to any line with a search result. The problem that I'm having is that this makes the terminal slightly wider than bat expects, and leads to every document that is opened to be just a few characters too wide for the screen.This issue was brought up to
bat
a while back (sharkdp/bat#376), which resulted in the addition of the--terminal-width
option. This works great withbat
by doing something likebat --terminal-width=-3
. The problem when usingbatpipe
, though, is that the--terminal-width
option is overridden and not passed on tobat
(see here).I'm not sure why this behavior exists in
batpipe
, but I assume there's a reason. I was wondering if this could be updated to account for the--terminal-width
option somehow and pass it on tobat
when present.Proposed Solution
I was thinking that an environment variable (e.g.
BATPIPE_TERM_WIDTH
or whatever) could be introduced to adjust the term width. When present, it would adjust the number passed to--terminal-width
.If there's a different preferred approach, though, just let me know. Either way, I'm happy to send a PR to fix this once I hear if this fix would be welcome.
Thank you!
The text was updated successfully, but these errors were encountered: