mirror of
https://github.com/eth-p/bat-extras.git
synced 2024-12-12 09:10:45 +01: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 New Issue
Block a user