Open cohml opened 1 year ago
Currently the quickest way to do this is the following, but it's unnecessarily involved:
$ cat $(bat --config-dir)/config
Wouldn't the quickest way to do this be bat --diagnostic
? Though it includes other stuff in the output, not just config.
Maybe we could highlight that output as Markdown in the terminal if it doesn't conflict with it being easy to copy/paste into a GitHub issue :)
That could work in a pinch, coloring the output of --diagnostic
. To be honest, that option was not on my radar.
If you are satisfied with that to the extent that a separate --config
option would be redundant and not worth doing, feel free to close this issue.
I can implement the --config
option, as it is a helpful option to access the current bat config easily.
Hey @keith-hall,
If you think adding this option to bat is useful, assign this issue to me please?
I'd be interested to hear what thoughts @sharkdp and @Enselic have on this matter, as opposed to just taking a decision by myself :)
IMHO cat $(bat --config-dir)/config
is not that much more complicated than bat --config
. On the other hand, bat --config
could perhaps take into account a system wide configs and environment variables when applicable.
Before a final decision it would be nice to see some draft code :)
My
bat
config currently looks like this:Sometimes I want to remind myself what some of those fields are set to. So something like the following would be very handy:
Currently the quickest way to do this is the following, but it's unnecessarily involved:
Bonus points for coloring the names of the fields so that they stand out,
bat
-style.Double bonus points for the ability to filter the output by named field, such as this:
This option may have niche appeal, but would surely be straightforward to add.
If I can ever get around to learning Rust, I will volunteer 😳