*: Fix regression introduced by opt_hook_width on non-tty output

This commit is contained in:
Ethan P 2020-04-27 18:29:56 -07:00 committed by Ethan P
parent af98cf5246
commit 7754406d54

View File

@ -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)"
}