Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions themes/barbuk/barbuk.theme.bash
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ function __exit_prompt() {
}

function __aws_profile_prompt() {
if [[ -n "${AWS_PROFILE}" ]]; then
if [[ -n "${AWS_PROFILE:-}" ]]; then
echo -n "${bold_purple?}${AWS_PROFILE_CHAR}${normal?}${AWS_PROFILE} "
fi
}

function __scaleway_profile_prompt() {
if [[ -n "${SCW_PROFILE}" ]]; then
if [[ -n "${SCW_PROFILE:-}" ]]; then
echo -n "${bold_purple?}${SCALEWAY_PROFILE_CHAR}${normal?}${SCW_PROFILE} "
fi
}
Expand Down Expand Up @@ -189,9 +189,9 @@ function __ssh_prompt() {

function __python_venv_prompt() {
local python_info=""
if [[ -n "${CONDA_DEFAULT_ENV}" ]]; then
if [[ -n "${CONDA_DEFAULT_ENV:-}" ]]; then
python_info="${CONDA_DEFAULT_ENV}"
elif [[ -n "${VIRTUAL_ENV_PROMPT}" ]]; then
elif [[ -n "${VIRTUAL_ENV_PROMPT:-}" ]]; then
python_info="${VIRTUAL_ENV_PROMPT}"
elif [[ -f pyproject.toml ]]; then
python_info=$(awk -F'"' '/^requires-python/ {print $2}' pyproject.toml)
Expand Down Expand Up @@ -286,7 +286,7 @@ function __ansible_prompt() {
# /etc/ansible/ansible.cfg
#
# Ansible will process the above list and use the first file found, all others are ignored.
if [ -n "$ANSIBLE_CONFIG" ]; then
if [ -n "${ANSIBLE_CONFIG:-}" ]; then
config="$ANSIBLE_CONFIG"
elif [ -f ansible.cfg ]; then
config=ansible.cfg
Expand All @@ -297,15 +297,15 @@ function __ansible_prompt() {
config="/etc/ansible/ansible.cfg"
fi

if [ -n "$config" ]; then
if [ -n "${config:-}" ]; then
echo "${bold_purple?}${ANSIBLE_CHAR}${normal?}${config} "
fi
}

function __prompt-command() {
exit_code="$?"
command_duration=$(_command_duration)
local wrap_char
local wrap_char=

# Generate prompt
PS1="\n "
Expand Down
Loading