-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
env var BAT_OPTS #310
Comments
@VladimirAlexiev I agree, something like this would be useful. Some options such as That being said, however, I think that it might be getting a bit excessive on environment variables. We already have:
Maybe there's a better way to support this kind of functionality? I'm thinking there should be some sort of configuration file ( |
I agree that the number of environment variables is getting out of hand and I'd rather replace it with one of the suggested options ( The A dedicated configuration file would have the advantage that some things might be easier to configure (for the user) and potentially easier to parse/deserialize (for the developer). I'm thinking about features such as #169 where it might be more convenient to have a dictionary-type structure in a configuration file as opposed to a command line flag which has to be specified multiple times ( Note that there is a hybrid variant which ripgrep uses where command line flags are stored in the configuration file. |
(To add some detail to @VladimirAlexiev's comment, in case you got here looking for how to tell # Add the `--wrap never` arg to all `bat` invocations
bat() {
command bat --wrap never "${args[@]}"
} ) |
@llimllib Not sure what kind of syntax this is, but that doesn't seem to work for me in bash or zsh. Simply setting an alias should be enough: alias bat="bat --wrap never" |
Support for a ripgrep-style configuration file: #338 |
@sharkdp that function works for me in bash, maybe you need to update? anyway the simple alias is obviously simpler and better 👍 |
Both |
Released in v0.8.0. |
BAT_THEME allows you to set a theme.
I also want to set
--wrap never
permanently, but there's no respective env var.Why not do like "less", where the
LESS
env var can take any of the command-line options?I'd suggest to use the name
BAT_OPTS
for this, since in the mind of Windows usersBAT
means "batch files".(Note: I've added this setting to your
bat()
function as per #263)The text was updated successfully, but these errors were encountered: