Skip to content

Commit

Permalink
Merge pull request spaceship-prompt#534 from salmanulfarzy/quote_loca…
Browse files Browse the repository at this point in the history
…l_variable

Group and quote local variable declaration
  • Loading branch information
denysdovhan authored Nov 20, 2018
2 parents e6e5b3b + 2c808a7 commit 8b0e0d7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sections/char.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@ SPACESHIP_CHAR_COLOR_SECONDARY="${SPACESHIP_CHAR_COLOR_SECONDARY="yellow"}"
# Paint $PROMPT_SYMBOL in red if previous command was fail and
# paint in green if everything was OK.
spaceship_char() {
local 'color'
local 'color' 'char'

if [[ $RETVAL -eq 0 ]]; then
color="$SPACESHIP_CHAR_COLOR_SUCCESS"
else
color="$SPACESHIP_CHAR_COLOR_FAILURE"
fi

local char

if [[ $UID -eq 0 ]]; then
char="$SPACESHIP_CHAR_SYMBOL_ROOT"
else
Expand Down

0 comments on commit 8b0e0d7

Please sign in to comment.