]> git.wh0rd.org Git - home.git/commitdiff
handle both verbose and non-verbose output
authorMike Frysinger <vapier@gentoo.org>
Thu, 6 Sep 2012 17:05:06 +0000 (13:05 -0400)
committerMike Frysinger <vapier@gentoo.org>
Thu, 6 Sep 2012 17:05:06 +0000 (13:05 -0400)
.bin/r

diff --git a/.bin/r b/.bin/r
index 08edfe2fffed538a44ec132eff24e2cafb84ba19..bb754d16e11e979b5f482852d28b173ec7084fb2 100755 (executable)
--- a/.bin/r
+++ b/.bin/r
@@ -33,9 +33,9 @@ rebase)
                                if ($0 ~ "^[*] *[(]no branch[)]") {
                                        next
                                } else if ($1 == "*") {
                                if ($0 ~ "^[*] *[(]no branch[)]") {
                                        next
                                } else if ($1 == "*") {
-                                       b = $NF
+                                       b = $2
                                } else {
                                } else {
-                                       list = list $NF " "
+                                       list = list $1 " "
                                }
                        }
                        END { print list b }')
                                }
                        }
                        END { print list b }')