From ca7a848ca4efb8cfabb7275bfdbf469b08faa367 Mon Sep 17 00:00:00 2001 From: oGre Date: Wed, 30 Sep 2015 16:34:09 +0200 Subject: [PATCH] Renamed array variable to _fields to comply with the other arrays --- gitstatus.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gitstatus.sh b/gitstatus.sh index 3343889..9f345e5 100755 --- a/gitstatus.sh +++ b/gitstatus.sh @@ -69,14 +69,14 @@ else if [[ "${#branch_fields[@]}" -eq 1 ]]; then remote="_NO_REMOTE_TRACKING_" else - IFS="[,]" read -ra remote_line <<< "${branch_fields[1]}" - for rline in "${remote_line[@]}"; do - if [[ "$rline" == *ahead* ]]; then - num_ahead=${rline:6} + IFS="[,]" read -ra remote_fields <<< "${branch_fields[1]}" + for remote_field in "${remote_fields[@]}"; do + if [[ "$remote_field" == *ahead* ]]; then + num_ahead=${remote_field:6} ahead="_AHEAD_${num_ahead}" fi - if [[ "$rline" == *behind* ]]; then - num_behind=${rline:7} + if [[ "$remote_field" == *behind* ]]; then + num_behind=${remote_field:7} behind="_BEHIND_${num_behind# }" fi done