Skip to content

Commit

Permalink
Using arithmetic brackets for numerical comparison, instead of condit…
Browse files Browse the repository at this point in the history
…ional brackets.

Using == with [[ is a string comparison, not a numerical comparison as it ought
to be.
  • Loading branch information
giddie committed Nov 26, 2012
1 parent bafde1c commit f19a524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion themes/giddie/prompt_giddie_setup
Expand Up @@ -24,7 +24,7 @@ function prompt_giddie_precmd {

# Choose prompt symbol based on whether on not we're in a repository.
{ git branch 2>&1 } >/dev/null
if [[ $? == 0 ]]; then
if (( $? == 0 )); then
prompt_symbol='±'
else
prompt_symbol=')'
Expand Down

0 comments on commit f19a524

Please sign in to comment.