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:
parent
bafde1c982
commit
f19a52415e
1 changed files with 1 additions and 1 deletions
|
@ -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=')'
|
||||
|
|
Loading…
Add table
Reference in a new issue