Skip to content

Commit 56e179e

Browse files
committed
theme/powerline: SC2154
theme/powerline: SC2248 & SC2154
1 parent eb564d5 commit 56e179e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

themes/powerline/powerline.base.bash

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# shellcheck shell=bash
22
# shellcheck disable=SC2034 # Expected behavior for themes.
3-
# shellcheck disable=SC2154 #TODO: fix these all.
43

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

288-
[[ "${last_status}" -ne 0 ]] && __powerline_left_segment "$(__powerline_last_status_prompt ${last_status})"
287+
[[ "${last_status}" -ne 0 ]] && __powerline_left_segment "$(__powerline_last_status_prompt "${last_status}")"
289288

290-
if [[ -n "${LEFT_PROMPT}" ]] && [[ "${POWERLINE_COMPACT_AFTER_LAST_SEGMENT}" -eq 0 ]]; then
289+
if [[ -n "${LEFT_PROMPT}" ]] && [[ "${POWERLINE_COMPACT_AFTER_LAST_SEGMENT:-}" -eq 0 ]]; then
291290
__powerline_left_last_segment_padding
292291
fi
293292

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

303-
if [[ "${POWERLINE_COMPACT_PROMPT}" -eq 0 ]]; then
302+
if [[ "${POWERLINE_COMPACT_PROMPT:-}" -eq 0 ]]; then
304303
LEFT_PROMPT+=" "
305304
fi
306305

0 commit comments

Comments
 (0)