There is also the --force-colorization option, which is an alias for --decorations=always --color=always. This is useful if you want to keep colorization and decorations when piping bat 's output to another program. The batcat command works well, but also displays line numbers by default.
To disable this, pass the -p flag. For example alias bat='batcat -p --color=always'. If you add --theme=ansi to your bat command, you will get colors.
This theme use 3. --preview 'bat --color=always {1} --highlight-line {2}' As we run rg with --color=always option, we should tell fzf to parse ANSI color codes in the input by setting. 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.
Random bat color always results in "light tan" bat being used Bug Reports Forum. bat is a helpful alternative to cat when you want peruse files on the command-line with the improved readability that syntax highlighting has to offer. The Rust program boasts a wide selection of color themes, automatically uses the system pager when needed, provides syntax highlighting for man pages, and even provides basic integration with git.
A common creepy theme is the bat coloring - always black, or maybe dark brown. From far away, it makes sense that bats seem uniformly dark colored - but did you know that bats can have a range of fur color and patterns? To try and figure out what was going on, I printed the ANSI escape sequences generated by bat using bat --paging=never sf.sh --color=always bat -A -pp --color=never.