diff --git a/bash.bashrc b/bash.bashrc index b9cdce5..6da16d3 100644 --- a/bash.bashrc +++ b/bash.bashrc @@ -85,12 +85,12 @@ __prompt_command() { PS1+=" ${R}[${Mag}${branch}${R}|" local dirty=$(git status -s | wc -l) - if [ $dirty > 0 ]; then + if [[ $dirty -ne 0 ]]; then PS1+="${Mag}…$dirty" else local ahead=$(git rev-list --branches --not --remotes) echo $ahead - if [ $ahead > 0 ]; then + if [[ $ahead -ne 0 ]]; then PS1+="${Blu}↑${ahead}" else PS1+="${Gre}✔"