Bat: Man page: document `--config-file`

Created on 29 May 2019  Â·  6Comments  Â·  Source: sharkdp/bat

I ran man bat and saw several mentions of "the config file", so I looked for a "files" section to tell me where the config file is. But I couldn't find any.

The readme explains that bat --config-file will tell me where the config file is, so a good first step would be to document this option in the man page.

Maybe a FILES section would be good that lists all possible config file locations.

Do we want a batrc or bat-config man page to explain the syntax of that file? Maybe that's not required, maybe it's sufficient to add a CONFIG section to the bat man page, that section could mention bat --config-file and explain the config file syntax.

documentation feature-request good first issue help wanted

Most helpful comment

Done, see #870

All 6 comments

Thank you for pointing this out.

The readme explains that bat --config-file will tell me where the config file is, so a good first step would be to document this option in the man page.

:+1:

Maybe a FILES section would be good that lists all possible config file locations.

:+1:

Do we want a batrc or bat-config man page to explain the syntax of that file?

I'd rather keep everything in a single man page for now. Especially since the config format is really simple.

maybe it's sufficient to add a CONFIG section to the bat man page, that section could mention bat --config-file and explain the config file syntax.

Yes, that sounds great.

Some tools that I've used can generate a default config file that users can then modify. Would this be in line with bat's philosophy?

Eg, bat --config-file -o $file or bat --generate-config-file?

Some tools that I've used can generate a default config file that users can then modify. Would this be in line with bat's philosophy?

Yes, absolutely. That sounds like a great idea! It could generate an "empty" config file which includes a comprehensive set of commented-out configuration options:

…

# Enable this to use italic text on the terminal (not supported on all terminals):
#--italic-text=always

# Uncomment the following line to disable automatic paging:
#--paging=never

…

Closing this, as I have updated the man page accordingly (4e40d4c7204f7f966bbf798f180a1793f22b9258). @issmirnov it would be great if you could open a new ticket for your request.

Done, see #870

This has been fixed in bat 0.13.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

issmirnov picture issmirnov  Â·  3Comments

antoinemadec picture antoinemadec  Â·  3Comments

mjlbach picture mjlbach  Â·  3Comments

lilyball picture lilyball  Â·  3Comments

tbsvttr picture tbsvttr  Â·  3Comments