Skip to content
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

Allow for multiple occurences of "--style" #367

Closed
sharkdp opened this issue Oct 19, 2018 · 5 comments
Closed

Allow for multiple occurences of "--style" #367

sharkdp opened this issue Oct 19, 2018 · 5 comments
Labels
feature-request New feature or request good first issue Good for newcomers

Comments

@sharkdp
Copy link
Owner

sharkdp commented Oct 19, 2018

There should be a way to specify --style multiple times. This way, users can set --style=numbers,changes in their config file, but still use --style=changes on the command line.

@sharkdp sharkdp added feature-request New feature or request good first issue Good for newcomers Hacktoberfest labels Oct 19, 2018
@sindreij
Copy link
Contributor

I'd like to take this issue

@sindreij
Copy link
Contributor

Is the idea that the last argument overrides the first? So that --style=full --style=plain results in the plain style?

@sharkdp
Copy link
Owner Author

sharkdp commented Oct 21, 2018

Is the idea that the last argument overrides the first? So that --style=full --style=plain results in the plain style?

Exactly. It would be great if --plain and --number would also override any previous --style argument if that's possible.

@sindreij
Copy link
Contributor

@sharkdp: That sounds logical. I have created PR #371. It has code both to make style override style, and style and plain overrides each other. So only one the last one of those will have an effect.

I had to remove clap's splitting of the arguments in style. When using clap's splitting with overriding, it only keep the last one in the set. So --style numbers,changes becomes changes.

@sharkdp
Copy link
Owner Author

sharkdp commented Nov 11, 2018

This is now available in bat 0.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants