Merge pull request #984 from clayreimann/patch-2

Guard against unset COLUMNS
pull/987/head
Nils Winkler 2017-06-24 16:32:47 +02:00 committed by GitHub
commit 10a14585b4
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ function prompt_command() {
fi
local wrap_char=""
[[ ${#new_PS1} -gt $(($COLUMNS/1)) ]] && wrap_char="\n"
[[ $COLUMNS && ${#new_PS1} > $(($COLUMNS/1)) ]] && wrap_char="\n"
PS1="${new_PS1}${green}${wrap_char}${reset_color} "
}