mirror of
https://github.com/eth-p/bat-extras.git
synced 2026-09-10 07:16:25 -04:00
*: Fix regression introduced by opt_hook_width on non-tty output
This commit is contained in:
parent
c9f11c19ac
commit
b7b590da8a
|
|
@ -23,5 +23,5 @@ hook_width() {
|
|||
}
|
||||
|
||||
# Default terminal width.
|
||||
OPT_TERMINAL_WIDTH="$(stty size | cut -d' ' -f 2)"
|
||||
OPT_TERMINAL_WIDTH="$({ stty size 2>/dev/null || echo "22 80"; } | cut -d' ' -f 2)"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue