From 4f72457927a205c6f3cbf0786a1377763010c4dd Mon Sep 17 00:00:00 2001 From: Doncho Gunchev Date: Sun, 11 Oct 2020 14:21:07 +0300 Subject: [PATCH] Add a possible $COLUMNS not set workaround as comment --- bash/ps-twtty-7.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bash/ps-twtty-7.sh b/bash/ps-twtty-7.sh index 597adeb..e725bb0 100755 --- a/bash/ps-twtty-7.sh +++ b/bash/ps-twtty-7.sh @@ -78,6 +78,7 @@ function prompt_command() { local prompt="--($my_D, Err $E, $my_TTY)---($PWD)--" local fillsize=0 + #if [ -z "${COLUMNS}" ]; then COLUMNS=$(tput cols); fi let fillsize=${COLUMNS}-${#prompt} my_FILL="" if [ $fillsize -gt 0 ]; then