X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=generate-cmdlist.sh;h=75c68d948fd3105272f893ff2f901007519f62f5;hb=9996983c9c35353f352ef7c1abd9b3d2fbb21114;hp=5450918be339bf101a6562d518c0f4cc7b37c0f2;hpb=659db3f673fe199bad6ce9cc625d3a1b098bfbcf;p=git.git diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh index 5450918be..75c68d948 100755 --- a/generate-cmdlist.sh +++ b/generate-cmdlist.sh @@ -4,45 +4,17 @@ echo "/* Automatically generated by $0 */ struct cmdname_help { char name[16]; - char help[64]; + char help[80]; }; -struct cmdname_help common_cmds[] = {" +static struct cmdname_help common_cmds[] = {" -sort <<\EOF | -add -apply -archive -bisect -branch -checkout -cherry-pick -clone -commit -diff -fetch -grep -init-db -log -merge -mv -prune -pull -push -rebase -reset -revert -rm -show -show-branch -status -tag -verify-tag -EOF +sed -n -e 's/^git-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt | +sort | while read cmd do sed -n ' - /NAME/,/git-'"$cmd"'/H + /^NAME/,/git-'"$cmd"'/H ${ x s/.*git-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/