diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2019-05-09 22:07:28 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2019-05-09 22:07:28 -0400 |
commit | b39509d52d84ff52617dd9d3240b59cb3d8ca2d4 (patch) | |
tree | 21fde349e84ebb7871440aa6492acd72c0aa6103 /tests.sh | |
parent | 820735a85dbc2c9d19e948ea37945306ed7bc997 (diff) | |
download | bfs-b39509d52d84ff52617dd9d3240b59cb3d8ca2d4.tar.xz |
tests: Work around Bash 4 not updating $COLUMNS
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -2311,6 +2311,13 @@ function update_eol() { if [ -t 1 -a ! "$VERBOSE" ]; then BOL='\r\033[K' + + # Workaround for bash 4: checkwinsize is off by default. We can turn it on, + # but we also have to explicitly trigger a foreground job to finish so that + # it will update the window size before we use $COLUMNS + shopt -s checkwinsize + (:) + update_eol trap update_eol WINCH fi |