builtin-grep: allow -<n> and -[ABC]<n> notation for context lines.
[gitweb.git] / generate-cmdlist.sh
index 76ba49c88c9ed28c737eace854dec1141f9f60ee..6c59dbd68fc15ddd392086d375c8ecfc35e30c1a 100755 (executable)
@@ -41,8 +41,12 @@ whatchanged
 EOF
 while read cmd
 do
-    sed -n "/NAME/,/git-$cmd/H;
-           \$ {x; s/.*git-$cmd - \\(.*\\)/  {\"$cmd\", \"\1\"},/; p;}" \
-       "Documentation/git-$cmd.txt"
+     sed -n '
+     /NAME/,/git-'"$cmd"'/H
+     ${
+            x
+            s/.*git-'"$cmd"' - \(.*\)/  {"'"$cmd"'", "\1"},/
+           p
+     }' "Documentation/git-$cmd.txt"
 done
 echo "};"