Skip to content
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

[bat warning]: Unknown theme '...', using default. when using pager #2707

Closed
k1gen opened this issue Oct 11, 2023 · 3 comments
Closed

[bat warning]: Unknown theme '...', using default. when using pager #2707

k1gen opened this issue Oct 11, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@k1gen
Copy link

k1gen commented Oct 11, 2023

What steps will reproduce the bug?

  1. add
export LESS='-R --use-color -Dd+r$Du+b$'
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export MANROFFOPT="-c"

to your .zshrc
2. bat something, .zshrc itself for example
3. press 'q' to quit the pager

What happens?

I get [bat warning]: Unknown theme 'Catppuccin-mocha', using default. my ~/.config/bat/config contains only --theme="Catppuccin-mocha", and the theme seems to be applied successfully.

What did you expect to happen instead?

no output

How did you install bat?

with pacman


bat version and environment

$ bat .zshrc --diagnostic

Software version

bat 0.23.0 (871abd2)

Operating system

Linux 6.5.6-hardened1-1-hardened

Command-line

bat .zshrc --diagnostic 

Environment variables

SHELL=/usr/bin/zsh
PAGER=<not set>
LESS='-R --use-color -Dd+r$Du+b$'
LANG=en_EU.UTF-8
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='sh -c '\''col -bx | bat -l man -p'\'''

System Config file

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

Config file

--theme="Catppuccin-mocha"

Custom assets metadata

Could not read contents of '/home/olk/.cache/bat/metadata.yaml': No such file or directory (os error 2).

Custom assets

'/home/olk/.cache/bat' not found

Compile time information

  • Profile: release
  • Target triple: x86_64-unknown-linux-gnu
  • Family: unix
  • OS: linux
  • Architecture: x86_64
  • Pointer width: 64
  • Endian: little
  • CPU features: fxsr,sse,sse2
  • Host: x86_64-unknown-linux-gnu

Less version

> less --version 
less 643 (PCRE2 regular expressions)
Copyright (C) 1984-2023  Mark Nudelman
...
@k1gen k1gen added the bug Something isn't working label Oct 11, 2023
@k1gen k1gen changed the title [bat warning]: Unknown theme '...', using default., but theme applies successfully [bat warning]: Unknown theme '...', using default. when using pager Oct 12, 2023
@k1gen
Copy link
Author

k1gen commented Oct 16, 2023

this still happens with bat 0.24.0

@keith-hall
Copy link
Collaborator

I don't see any evidence that bat ships with a theme called Catppuccin-mocha...
If I add that line to my config, I get the same warning, but the highlighting is the same with and without it... Can you share a screenshot?
Perhaps you need to add it as a custom asset? #2124

@k1gen
Copy link
Author

k1gen commented Oct 22, 2023

I have just deleted whole ~/.config/bat dir and nothing changed, but the warning is gone, weird

@k1gen k1gen closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants