mirror of
https://github.com/sharkdp/bat.git
synced 2024-12-21 22:10:45 +01:00
Only use the last argument of {style,plain,number}
This commit is contained in:
parent
155bad3862
commit
41a5ff039b
@ -104,6 +104,8 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
.use_delimiter(false)
|
.use_delimiter(false)
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.overrides_with("style")
|
.overrides_with("style")
|
||||||
|
.overrides_with("plain")
|
||||||
|
.overrides_with("number")
|
||||||
// Cannot use clap's built in validation because we have to turn off clap's delimiters
|
// Cannot use clap's built in validation because we have to turn off clap's delimiters
|
||||||
.validator(|val| {
|
.validator(|val| {
|
||||||
let mut invalid_vals = val.split(",").filter(|style| {
|
let mut invalid_vals = val.split(",").filter(|style| {
|
||||||
@ -136,10 +138,10 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("plain")
|
Arg::with_name("plain")
|
||||||
.overrides_with("plain")
|
.overrides_with("plain")
|
||||||
|
.overrides_with("number")
|
||||||
.short("p")
|
.short("p")
|
||||||
.long("plain")
|
.long("plain")
|
||||||
.conflicts_with("style")
|
// .conflicts_with("style")
|
||||||
.conflicts_with("number")
|
|
||||||
.help("Show plain style (alias for '--style=plain').")
|
.help("Show plain style (alias for '--style=plain').")
|
||||||
.long_help(
|
.long_help(
|
||||||
"Only show plain style, no decorations. This is an alias for \
|
"Only show plain style, no decorations. This is an alias for \
|
||||||
@ -151,7 +153,6 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
.long("number")
|
.long("number")
|
||||||
.overrides_with("number")
|
.overrides_with("number")
|
||||||
.short("n")
|
.short("n")
|
||||||
.conflicts_with("style")
|
|
||||||
.help("Show line numbers (alias for '--style=numbers').")
|
.help("Show line numbers (alias for '--style=numbers').")
|
||||||
.long_help(
|
.long_help(
|
||||||
"Only show line numbers, no other decorations. This is an alias for \
|
"Only show line numbers, no other decorations. This is an alias for \
|
||||||
|
Loading…
Reference in New Issue
Block a user