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 doesn't colorize the output when --show-all is set, even with --color always or --force-colorization #3181

Open
Bowarc opened this issue Jan 19, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Bowarc
Copy link

Bowarc commented Jan 19, 2025

What steps will reproduce the bug?

Try to display all characters with --show-all, the text is no longer colored. (only the characters added by --show-all)

I tried:

  • --show-all --color always
  • --show-all --force-colorization

None worked

What happens?

Only the characters added by --show-all are colored

What did you expect to happen instead?

The whole text also having color

How did you install bat?

Installed with cargo

bat version and environment

Software version

bat 0.25.0

Operating system

  • OS: Linux (Fedora Linux 41)
  • Kernel: 6.12.9-200.fc41.x86_64

Command-line

bat ./back/src/main.rs --show-all --color always --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_GB.UTF-8
LC_ALL=<not set>
LESS=<not set>
MANPAGER=<not set>
NO_COLOR=<not set>
PAGER=<not set>
SHELL=/bin/fish
TERM=xterm-256color
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 '/home/bowarc/.config/bat/config': No such file or directory (os error 2).

Custom assets metadata

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

Custom assets

'/home/bowarc/.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 661 (POSIX regular expressions)
Copyright (C) 1984-2024  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
@Bowarc Bowarc added the bug Something isn't working label Jan 19, 2025
@keith-hall
Copy link
Collaborator

#414

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