What steps will reproduce the bug?
export BAT_THEME_DARK="Catppuccin Macchiato"
export BAT_THEME_LIGHT="Catppuccin Latte"
bat lib/util/resource.py
What happens?
bat prints the file using the default theme
What did you expect to happen instead?
bat to print the file using either the dark or light theme specified using the environment variables
This works using the command line arguments as invoking bat --theme-dark="Catppuccin Macchiato" --theme-light="Catppuccin Latte" lib/util/resource.py has bat printing the file using the correct Catppuccin theme depending on whether the system is in dark/light mode
How did you install bat?
homebrew
bat version and environment
Software version
bat 0.25.0
Operating system
- OS: macOS 15.2 Sequoia
- Kernel: 24.2.0
Command-line
bat lib/util/resource.py --diagnostic
Environment variables
BAT_CACHE_PATH=<not set>
BAT_CONFIG_PATH=<not set>
BAT_OPTS=<not set>
BAT_PAGER=<not set>
BAT_PAGING=<not set>
BAT_STYLE=<not set>
BAT_TABS=<not set>
BAT_THEME=<not set>
COLORTERM=truecolor
LANG=en_CA.UTF-8
LC_ALL=<not set>
LESS=-R
MANPAGER=<not set>
NO_COLOR=<not set>
PAGER=less
SHELL=/bin/zsh
TERM=xterm-ghostty
XDG_CACHE_HOME=<not set>
XDG_CONFIG_HOME=<not set>
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 '/Users/sherif/.config/bat/config': No such file or directory (os error 2).
Custom assets metadata
bat_version: 0.25.0
creation_time:
secs_since_epoch: 1736386552
nanos_since_epoch: 315366000
Custom assets
- metadata.yaml, 97 bytes
- syntaxes.bin, 969578 bytes
- themes.bin, 49230 bytes
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
What steps will reproduce the bug?
export BAT_THEME_DARK="Catppuccin Macchiato"export BAT_THEME_LIGHT="Catppuccin Latte"bat lib/util/resource.pyWhat happens?
batprints the file using the default themeWhat did you expect to happen instead?
batto print the file using either the dark or light theme specified using the environment variablesThis works using the command line arguments as invoking
bat --theme-dark="Catppuccin Macchiato" --theme-light="Catppuccin Latte" lib/util/resource.pyhasbatprinting the file using the correctCatppuccintheme depending on whether the system is in dark/light modeHow did you install
bat?homebrew
bat version and environment
Software version
bat 0.25.0
Operating system
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 '/Users/sherif/.config/bat/config': No such file or directory (os error 2).
Custom assets metadata
Custom assets
Compile time information
Less version