-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Using -S
inside bat
does not chop long lines
#2869
Comments
I think I know what is happening. When calling How should I call |
If it's not too much trouble, would you be able to add a screenshot to demonstrate? Line chopping involves some complicated interactions between |
|
I am having the same problem as @SamuelLarkin - Admittedly I've implemented much greater Note that invoking Software versionbat 0.24.0 Operating systemmacOS 14.3.1 (Darwin 23.3.0) Command-linebat --diagnostic Environment variablesSHELL=/bin/zsh
PAGER=<not set>
LESS=<not set>
LANG=en_US.UTF-8
LC_ALL=<not set>
BAT_PAGER='less --chop-long-lines --RAW-CONTROL-CHARS --header=1 --jump-target=3 --line-num-width=0 --LONG-PROMPT --no-number-headers --shift=4 --status-column --use-color --color=HGk --color=NGk'
BAT_PAGING=<not set>
BAT_CACHE_PATH=<not set>
BAT_CONFIG_PATH=<not set>
BAT_OPTS='--italic-text=always --pager='\''less --chop-long-lines --RAW-CONTROL-CHARS --header=1 --jump-target=3 --line-num-width=0 --LONG-PROMPT --no-number-headers --shift=4 --status-column --use-color --color=HGk --color=NGk'\'' --style=changes,header-filename,rule,snip --theme=TwoDark --wrap=never'
BAT_STYLE=<not set>
BAT_TABS=<not set>
BAT_THEME=<not set>
XDG_CONFIG_HOME=<not set>
XDG_CACHE_HOME=<not set>
COLORTERM=truecolor
NO_COLOR=<not set>
MANPAGER='sh -c '\''col -bx | bat --language=man --style=plain --theme=Monokai\ Extended'\''' System Config fileCould not read contents of '/etc/bat/config': No such file or directory (os error 2). Config fileCould not read contents of '$HOME/.config/bat/config': No such file or directory (os error 2). Custom assets metadataCould not read contents of '$HOME/.cache/bat/metadata.yaml': No such file or directory (os error 2). Custom assets'$HOME/.cache/bat' not found Compile time information
Less version
In the interest of linking issues, #2837 may be of minor relevance. |
Actually, in investigating this further, I realized that @SamuelLarkin doesn't seem to be using that flag, but it may explain this issue in my case at least. I've opened an issue for it (gwsw/less#487). |
What steps will reproduce the bug?
bat file_with_long_lines.txt
What happens?
If I open a file with long lines, in my case a csv file with long lines, I see that the lines are wrapped. Pressing
-S
inbat
claimsChop long lines
but the lines stay wrapped.But if I invoke
bat -S file_with_long_lines.txt
then the lines are not wrapped.What did you expect to happen instead?
I would expect that pressing
-S
multiple times insidebat
would toggle on and off line wrapping.How did you install
bat
?cargo install --force bat
bat version and environment
Software version
bat 0.24.0
Operating system
Linux 3.10.0-1160.62.1.el7.x86_64
Command-line
Environment variables
System Config file
Could not read contents of '/etc/bat/config': No such file or directory (os error 2).
Config file
Could not read contents of '$HOME/.config/bat/config': No such file or directory (os error 2).
Custom assets metadata
Could not read contents of '$HOME/.cache/bat/metadata.yaml': No such file or directory (os error 2).
Custom assets
'$HOME/.cache/bat' not found
Compile time information
Less version
The text was updated successfully, but these errors were encountered: