mirror of
https://github.com/eth-p/bat-extras.git
synced 2025-07-14 19:25:03 +02:00
*: Fix regression introduced by opt_hook_width on non-tty output
This commit is contained in:
@ -23,5 +23,5 @@ hook_width() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Default terminal 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)"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user