bat: Scrolling in iterm2 does not work
What steps will reproduce the bug?
- if I run
bat .zshrc.backupin the macos terminal I’m able to scroll all the content of the file. Initially, on my screen, there are 30 lines and I can scroll it up to the last 102 lines. - if I run
bat .zshrc.backupin iterm2 I’m not able to scroll all the content of the file until I press enter to load more rows and then I will be able to scroll up and down from 1 to 102 line.
What happens? The scrolling does not work
What did you expect to happen instead?
The scrolling does work
How did you install bat?
homebrew
bat version and environment
bat .zshrc.backup --diagnostic
#### Software version
bat 0.22.1
#### Operating system
macOS 12.6 (Darwin 21.6.0)
#### Command-line
```bash
bat .zshrc.backup --diagnostic
Environment variables
SHELL=/bin/zsh
PAGER=less
LESS=-R
LANG=<not set>
LC_ALL=<not set>
BAT_PAGER=<not set>
BAT_CACHE_PATH=<not set>
BAT_CONFIG_PATH=<not set>
BAT_OPTS=<not set>
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=<not set>
System Config file
Could not read contents of ‘/etc/bat/config’: No such file or directory (os error 2).
Config file
# Uncomment the following line if you are using less version >= 551 and want to
# enable mouse scrolling support in `bat` when running inside tmux. This might
# disable text selection, unless you press shift.
# --pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse"
# Syntax mappings: map a certain filename pattern to a language.
# Example 1: use the C++ syntax for Arduino .ino files
# Example 2: Use ".gitignore"-style highlighting for ".ignore" files
--map-syntax "zshrc:Bourne Again Shell (bash)"
--map-syntax "zshenv:Bourne Again Shell (bash)"
--map-syntax "Brewfile:Bourne Again Shell (bash)"
Custom assets metadata
Could not read contents of ‘/Users/iamtodor/.cache/bat/metadata.yaml’: No such file or directory (os error 2).
Custom assets
‘/Users/iamtodor/.cache/bat’ not found
Compile time information
- Profile: release
- Target triple: x86_64-apple-darwin
- Family: unix
- OS: macos
- Architecture: x86_64
- Pointer width: 64
- Endian: little
- CPU features: fxsr,sse,sse2,sse3,ssse3
- Host: x86_64-apple-darwin
Less version
> less --version
less 608 (PCRE2 regular expressions)
Copyright (C) 1984-2022 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
might be related to https://github.com/sharkdp/bat/issues/188
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 15 (2 by maintainers)
@eth-p surprisingly this one
bat --pager="less -R --mouse"works for me!Nope, I do not use any multiplexer, just vanilla iterm2