Skip to content

Instantly share code, notes, and snippets.

@igorshubovych
Created May 16, 2024 19:48
Show Gist options
  • Save igorshubovych/626c52024ddb7ec8eac9a391da110c89 to your computer and use it in GitHub Desktop.
Save igorshubovych/626c52024ddb7ec8eac9a391da110c89 to your computer and use it in GitHub Desktop.
Preview bat themes for a given file
#!/bin/bash
## See the script here
## https://www.josean.com/posts/7-amazing-cli-tools
## Requirements
## - bat (https://github.com/sharkdp/bat)
## - fzf (https://github.com/junegunn/fzf)
bat --list-themes | fzf --preview="bat --theme={} --color=always /path/to/file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment