Using arithmetic brackets for numerical comparison, instead of conditional brackets.

Using == with [[ is a string comparison, not a numerical comparison as it ought
to be.
This commit is contained in:
Paul Gideon Dann 2012-03-13 15:46:02 +00:00
parent bafde1c982
commit f19a52415e

View file

@ -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=')'