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
Open up a file with a lot of lines too long to fit in the width of your terminal
Try to use movement commands based on line numbers (e.g. 1000G or 500j)
What happens?
The movement appears to be based on line numbers in the displayed output, not line numbers of the original file. In the case of the big file I am looking at right now that caused me to notice this behavior, running 1000G took me to line 678, and then 500j took me from there to line 1105.
What did you expect to happen instead?
I expected 1000G to take me to the 1000th line in the original file, and for 500j to move me down 500 lines from the original file (e.g. from line 1000 to 1500).
I'm not sure if there's anything that could be done here, or if it would require work done in the pager (I'm not familiar with the inner workings of less), and I also don't know how hard it would be to make a new pager that supports this if less can't, but I thought I'd document here that the behavior isn't what I expected in a way that makes it harder for me to use this tool on long files with long lines.
Could not read contents of '/etc/bat/config': No such file or directory (os error 2).
Config file
Could not read contents of '~/.config/bat/config': No such file or directory (os error 2).
Custom assets metadata
Could not read contents of '~/.cache/bat/metadata.yaml': No such file or directory (os error 2).
Custom assets
'~/.cache/bat' not found
Compile time information
Profile: release
Target triple: aarch64-apple-darwin
Family: unix
OS: macos
Architecture: aarch64
Pointer width: 64
Endian: little
CPU features: aes,crc,dit,dotprod,dpb,dpb2,fcma,fhm,flagm,fp16,frintts,jsconv,lor,lse,neon,paca,pacg,pan,pmuv3,ras,rcpc,rcpc2,rdm,sb,sha2,sha3,ssbs,vh
Host: aarch64-apple-darwin
Less version
> less --version
less 581.2 (POSIX regular expressions)
Copyright (C) 1984-2021 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less
(note: I replaced my home path with ~ every time it showed up, also this isn't specific to one file, but any file with many long lines).
The text was updated successfully, but these errors were encountered:
What steps will reproduce the bug?
1000G
or500j
)What happens?
The movement appears to be based on line numbers in the displayed output, not line numbers of the original file. In the case of the big file I am looking at right now that caused me to notice this behavior, running
1000G
took me to line 678, and then500j
took me from there to line 1105.What did you expect to happen instead?
I expected
1000G
to take me to the 1000th line in the original file, and for 500j to move me down 500 lines from the original file (e.g. from line 1000 to 1500).I'm not sure if there's anything that could be done here, or if it would require work done in the pager (I'm not familiar with the inner workings of
less
), and I also don't know how hard it would be to make a new pager that supports this ifless
can't, but I thought I'd document here that the behavior isn't what I expected in a way that makes it harder for me to use this tool on long files with long lines.How did you install
bat
?Through
cargo install bat
bat version and environment
Software version
bat 0.22.1
Operating system
macOS 13.0 (Darwin 22.1.0)
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 '~/.config/bat/config': No such file or directory (os error 2).
Custom assets metadata
Could not read contents of '~/.cache/bat/metadata.yaml': No such file or directory (os error 2).
Custom assets
'~/.cache/bat' not found
Compile time information
Less version
(note: I replaced my home path with
~
every time it showed up, also this isn't specific to one file, but any file with many long lines).The text was updated successfully, but these errors were encountered: