Prevent unbound variable errors

pull/926/head
Jeremy Mathevet 2017-03-21 12:04:18 +00:00
parent 472bf9d97b
commit 588213980d
1 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,7 @@
THEME_CHECK_SUDO=${THEME_CHECK_SUDO:=true} THEME_CHECK_SUDO=${THEME_CHECK_SUDO:=true}
function set_color { function set_color {
set +u
if [[ "${1}" != "-" ]]; then if [[ "${1}" != "-" ]]; then
fg="38;5;${1}" fg="38;5;${1}"
fi fi
@ -13,6 +14,7 @@ function set_color {
} }
function __powerline_user_info_prompt { function __powerline_user_info_prompt {
set +u
local user_info="" local user_info=""
local color=${USER_INFO_THEME_PROMPT_COLOR} local color=${USER_INFO_THEME_PROMPT_COLOR}
@ -51,6 +53,7 @@ function __powerline_ruby_prompt {
} }
function __powerline_python_venv_prompt { function __powerline_python_venv_prompt {
set +u
local python_venv="" local python_venv=""
if [[ -n "${CONDA_DEFAULT_ENV}" ]]; then if [[ -n "${CONDA_DEFAULT_ENV}" ]]; then