Merge pull request #984 from clayreimann/patch-2
Guard against unset COLUMNS
This commit is contained in:
@@ -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} "
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user