mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
Allow offset values in --terminal-width
Allows the `width` argument to `--terminal-width` to be an offset
instead of an absolute number. Examples:
--terminal-width=80 # Set output width to 80 characters
--terminal-width=-2 # Set output width to actual_width - 2
closes #376
This commit is contained in:
1 parent
78f26d0caf
commit
dda27b253b
2 files changed
+23
-3
No files matched your search
+6
-2
@@ -287,8 +287,12 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
||||
.long("terminal-width")
|
||||
.takes_value(true)
|
||||
.value_name("width")
|
||||
.hidden(true)
|
||||
.help("Set the width of the terminal"),
|
||||
.hidden_short_help(true)
|
||||
.help(
|
||||
"Explicitly set the width of the terminal instead of determining it \
|
||||
automatically. If prefixed with '+' or '-', the value will be treated \
|
||||
as an offset to the actual terminal width.",
|
||||
),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("no-config")
|
||||
|
||||
Reference in new issue
Block a user