Skip to content

Commit

Permalink
theme/powerline: SC2154
Browse files Browse the repository at this point in the history
theme/powerline: SC2248 & SC2154
  • Loading branch information
gaelicWizard committed Sep 22, 2021
1 parent eb564d5 commit 56e179e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions themes/powerline/powerline.base.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# shellcheck shell=bash
# shellcheck disable=SC2034 # Expected behavior for themes.
# shellcheck disable=SC2154 #TODO: fix these all.

# Define this here so it can be used by all of the Powerline themes
THEME_CHECK_SUDO=${THEME_CHECK_SUDO:=true}
Expand Down Expand Up @@ -285,9 +284,9 @@ function __powerline_prompt_command() {
[[ -n "${info}" ]] && __powerline_left_segment "${info}"
done

[[ "${last_status}" -ne 0 ]] && __powerline_left_segment "$(__powerline_last_status_prompt ${last_status})"
[[ "${last_status}" -ne 0 ]] && __powerline_left_segment "$(__powerline_last_status_prompt "${last_status}")"

if [[ -n "${LEFT_PROMPT}" ]] && [[ "${POWERLINE_COMPACT_AFTER_LAST_SEGMENT}" -eq 0 ]]; then
if [[ -n "${LEFT_PROMPT}" ]] && [[ "${POWERLINE_COMPACT_AFTER_LAST_SEGMENT:-}" -eq 0 ]]; then
__powerline_left_last_segment_padding
fi

Expand All @@ -300,7 +299,7 @@ function __powerline_prompt_command() {
fi
[[ -n "${LEFT_PROMPT}" ]] && LEFT_PROMPT+="${prompt_color}${separator_char}${normal}"

if [[ "${POWERLINE_COMPACT_PROMPT}" -eq 0 ]]; then
if [[ "${POWERLINE_COMPACT_PROMPT:-}" -eq 0 ]]; then
LEFT_PROMPT+=" "
fi

Expand Down

0 comments on commit 56e179e

Please sign in to comment.