sharkdp/bat

--list-themes + BAT_OPTS can be problematic

Aperta

#1618 aperta il 25 apr 2021

 (11 commenti) (1 reazione) (0 assegnatari)Rust (1557 fork)batch import
buggood first issue

Metriche repository

Star
 (58.889 stelle)
Metriche merge PR
 (Merge medio 16g 6h) (11 PR mergiate in 30 g)

Descrizione

Thank you so much for creating bat! Very happy with the app.

I'm customizing things a bit and my BAT_OPTS is breaking --list-themes. It's paging one theme at a time and the theme names are not shown. That makes it unusable, unfortunately. Maybe we should ignore --paging=always (or perhaps all config) when running that command?

BAT_OPTS="--theme=TwoDark --paging=always --pager='less -j3 -i -J -M -R -S -w -z-4'"

Software version

bat 0.18.0

Operating system

Darwin 19.4.0

Command-line

bat --diagnostic 

Environment variables

SHELL=/bin/zsh
PAGER=less
BAT_PAGER=<not set>
BAT_CACHE_PATH=<not set>
BAT_CONFIG_PATH=<not set>
BAT_OPTS="--theme=TwoDark --paging=always --pager='less -j3 -i -J -M -R -S -w -z-4'"
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>

Config file

Could not read contents of '/Users/amd/.config/bat/config': No such file or directory (os error 2).

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 487 (POSIX regular expressions)
Copyright (C) 1984-2016  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.
Homepage: http://www.greenwoodsoftware.com/less

Guida contributor