threads / patch / 43584

patch, 3 partsGroup common commands into for groups for easier navigation

Subject: [PATCH 3/3] Group common commands into for groups for easier navigation

## tl;dr

2 messages between Dec 1, 2006 and Dec 1, 2006. Diffs are folded; open one to read it.

replies: 1people: 1as markdown or json

pclouds@gmail.com· Dec 1, 2006, 15:08 UTC · lore

[PATCH 2/3] Prepare for grouped common command list generation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 generate-cmdlist.sh |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
Show changes to generate-cmdlist.sh +6 −1
diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
index 5450918..b45495d 100755
--- a/generate-cmdlist.sh
+++ b/generate-cmdlist.sh
@@ -9,7 +9,7 @@ struct cmdname_help
 
 struct cmdname_help common_cmds[] = {"
 
-sort <<\EOF |
+cat <<\EOF |
 add
 apply
 archive
@@ -41,6 +41,11 @@ verify-tag
 EOF
 while read cmd
 do
+     [ -z "$cmd" ] && continue
+     if echo $cmd|grep -q '^G:'; then
+       echo '  {"'$(echo -n $cmd|sed 's/^G://')'",""},'
+       continue
+     fi
      sed -n '
      /NAME/,/git-'"$cmd"'/H
      ${
-- 
1.4.4.rc1.g9124
pclouds@gmail.com· Dec 1, 2006, 15:08 UTC · re: pclouds@gmail.com · lore

Repository/Branch level commands are grouped into group Repository File manipulation commands are in group Manipulation Other status commands are in group Status The rest is in group Other

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
This is a suggestion. Someone may have better layout than me.
 generate-cmdlist.sh |   35 +++++++++++++++++++++--------------
 1 files changed, 21 insertions(+), 14 deletions(-)
Show changes to generate-cmdlist.sh +21 −14
diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
index b45495d..f385854 100755
--- a/generate-cmdlist.sh
+++ b/generate-cmdlist.sh
@@ -10,33 +10,40 @@ struct cmdname_help
 struct cmdname_help common_cmds[] = {"
 
 cat <<\EOF |
-add
-apply
-archive
-bisect
+G:Repository
+init-db
 branch
-checkout
-cherry-pick
 clone
-commit
-diff
 fetch
-grep
-init-db
-log
 merge
-mv
 prune
 pull
 push
-rebase
 reset
+tag
+
+G:Manipulation
+add
+apply
+checkout
+commit
+mv
 revert
 rm
+
+G:Status
+diff
+log
 show
 show-branch
 status
-tag
+
+G:Other
+archive
+bisect
+cherry-pick
+grep
+rebase
 verify-tag
 EOF
 while read cmd
-- 
1.4.4.rc1.g9124

← back to recent threads