1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-02 03:12:25 +01:00

Fixed inverted logic on -S and --chop-long-lines

This commit is contained in:
John Higgins
2022-10-13 23:52:15 -07:00
parent 03216c9c18
commit 236a2c5794
4 changed files with 18 additions and 38 deletions

View File

@@ -175,7 +175,7 @@ impl App {
_ => unreachable!("other values for --wrap are not allowed"),
}
} else {
WrappingMode::Character
WrappingMode::NoWrapping(true)
}
} else {
// We don't have the tty width when piping to another program.

View File

@@ -206,7 +206,7 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
.long("chop-long-lines")
.short('S')
.takes_value(false)
.help("Truncate all lines longer than screen width. Alias for '--wrap=never'."),
.help("Truncate all lines longer than screen width. Alias for '--wrap=character'."),
)
.arg(
Arg::new("terminal-width")