@@ -118,13 +118,13 @@ function __exit_prompt() {
118118}
119119
120120function __aws_profile_prompt() {
121- if [[ -n " ${AWS_PROFILE} " ]]; then
121+ if [[ -n " ${AWS_PROFILE:- } " ]]; then
122122 echo -n " ${bold_purple?}${AWS_PROFILE_CHAR}${normal?}${AWS_PROFILE} "
123123 fi
124124}
125125
126126function __scaleway_profile_prompt() {
127- if [[ -n " ${SCW_PROFILE} " ]]; then
127+ if [[ -n " ${SCW_PROFILE:- } " ]]; then
128128 echo -n " ${bold_purple?}${SCALEWAY_PROFILE_CHAR}${normal?}${SCW_PROFILE} "
129129 fi
130130}
@@ -189,9 +189,9 @@ function __ssh_prompt() {
189189
190190function __python_venv_prompt() {
191191 local python_info=" "
192- if [[ -n " ${CONDA_DEFAULT_ENV} " ]]; then
192+ if [[ -n " ${CONDA_DEFAULT_ENV:- } " ]]; then
193193 python_info=" ${CONDA_DEFAULT_ENV} "
194- elif [[ -n " ${VIRTUAL_ENV_PROMPT} " ]]; then
194+ elif [[ -n " ${VIRTUAL_ENV_PROMPT:- } " ]]; then
195195 python_info=" ${VIRTUAL_ENV_PROMPT} "
196196 elif [[ -f pyproject.toml ]]; then
197197 python_info=$( awk -F' "' ' /^requires-python/ {print $2}' pyproject.toml)
@@ -286,7 +286,7 @@ function __ansible_prompt() {
286286 # /etc/ansible/ansible.cfg
287287 #
288288 # Ansible will process the above list and use the first file found, all others are ignored.
289- if [ -n " $ANSIBLE_CONFIG " ]; then
289+ if [ -n " ${ ANSIBLE_CONFIG:- } " ]; then
290290 config=" $ANSIBLE_CONFIG "
291291 elif [ -f ansible.cfg ]; then
292292 config=ansible.cfg
@@ -297,15 +297,15 @@ function __ansible_prompt() {
297297 config=" /etc/ansible/ansible.cfg"
298298 fi
299299
300- if [ -n " $config " ]; then
300+ if [ -n " ${ config:- } " ]; then
301301 echo " ${bold_purple?}${ANSIBLE_CHAR}${normal?}${config} "
302302 fi
303303}
304304
305305function __prompt-command() {
306306 exit_code=" $? "
307307 command_duration=$( _command_duration)
308- local wrap_char
308+ local wrap_char=
309309
310310 # Generate prompt
311311 PS1=" \n "
0 commit comments