X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=generate-cmdlist.sh;h=75c68d948fd3105272f893ff2f901007519f62f5;hb=9996983c9c35353f352ef7c1abd9b3d2fbb21114;hp=ec1eda20de8d510a9acfd981150a5f1a438a0fe4;hpb=5126f35a54f179d125775e6d18213f76aa7856b3;p=git.git diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh index ec1eda20d..75c68d948 100755 --- a/generate-cmdlist.sh +++ b/generate-cmdlist.sh @@ -4,44 +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 -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"},/