shortlog: prompt when reading from terminal by mistake
[tgit.git] / Documentation / cmd-list.perl
blobb54382b2bfdfc7926af8c4b0552f82235619f1c6
3 sub format_one {
4 my ($out, $name) = @_;
5 my ($state, $description);
6 open I, '<', "$name.txt" or die "No such file $name.txt";
7 while (<I>) {
8 if (/^NAME$/) {
9 $state = 1;
10 next;
12 if ($state == 1 && /^----$/) {
13 $state = 2;
14 next;
16 next if ($state != 2);
17 chomp;
18 $description = $_;
19 last;
21 close I;
22 if (!defined $description) {
23 die "No description found in $name.txt";
25 if (my ($verify_name, $text) = ($description =~ /^($name) - (.*)/)) {
26 print $out "gitlink:$name\[1\]::\n";
27 print $out "\t$text.\n\n";
29 else {
30 die "Description does not match $name: $description";
34 my %cmds = ();
35 while (<DATA>) {
36 next if /^#/;
38 chomp;
39 my ($name, $cat) = /^(\S+)\s+(.*)$/;
40 push @{$cmds{$cat}}, $name;
43 for my $cat (qw(ancillaryinterrogators
44 ancillarymanipulators
45 mainporcelain
46 plumbinginterrogators
47 plumbingmanipulators
48 synchingrepositories
49 foreignscminterface
50 purehelpers
51 synchelpers)) {
52 my $out = "cmds-$cat.txt";
53 open O, '>', "$out+" or die "Cannot open output file $out+";
54 for (@{$cmds{$cat}}) {
55 format_one(\*O, $_);
57 close O;
58 rename "$out+", "$out";
61 __DATA__
62 git-add mainporcelain
63 git-am mainporcelain
64 git-annotate ancillaryinterrogators
65 git-applymbox ancillaryinterrogators
66 git-applypatch purehelpers
67 git-apply plumbingmanipulators
68 git-archimport foreignscminterface
69 git-archive mainporcelain
70 git-bisect mainporcelain
71 git-blame ancillaryinterrogators
72 git-branch mainporcelain
73 git-bundle mainporcelain
74 git-cat-file plumbinginterrogators
75 git-checkout-index plumbingmanipulators
76 git-checkout mainporcelain
77 git-check-ref-format purehelpers
78 git-cherry ancillaryinterrogators
79 git-cherry-pick mainporcelain
80 git-clean mainporcelain
81 git-clone mainporcelain
82 git-commit mainporcelain
83 git-commit-tree plumbingmanipulators
84 git-convert-objects ancillarymanipulators
85 git-count-objects ancillaryinterrogators
86 git-cvsexportcommit foreignscminterface
87 git-cvsimport foreignscminterface
88 git-cvsserver foreignscminterface
89 git-daemon synchingrepositories
90 git-describe mainporcelain
91 git-diff-files plumbinginterrogators
92 git-diff-index plumbinginterrogators
93 git-diff mainporcelain
94 git-diff-tree plumbinginterrogators
95 git-fast-import ancillarymanipulators
96 git-fetch mainporcelain
97 git-fetch-pack synchingrepositories
98 git-fmt-merge-msg purehelpers
99 git-for-each-ref plumbinginterrogators
100 git-format-patch mainporcelain
101 git-fsck ancillaryinterrogators
102 git-gc mainporcelain
103 git-get-tar-commit-id ancillaryinterrogators
104 git-grep mainporcelain
105 git-hash-object plumbingmanipulators
106 git-http-fetch synchelpers
107 git-http-push synchelpers
108 git-imap-send foreignscminterface
109 git-index-pack plumbingmanipulators
110 git-init mainporcelain
111 git-instaweb ancillaryinterrogators
112 gitk mainporcelain
113 git-local-fetch synchingrepositories
114 git-log mainporcelain
115 git-lost-found ancillarymanipulators
116 git-ls-files plumbinginterrogators
117 git-ls-remote plumbinginterrogators
118 git-ls-tree plumbinginterrogators
119 git-mailinfo purehelpers
120 git-mailsplit purehelpers
121 git-merge-base plumbinginterrogators
122 git-merge-file plumbingmanipulators
123 git-merge-index plumbingmanipulators
124 git-merge mainporcelain
125 git-merge-one-file purehelpers
126 git-merge-tree ancillaryinterrogators
127 git-mergetool ancillarymanipulators
128 git-mktag plumbingmanipulators
129 git-mktree plumbingmanipulators
130 git-mv mainporcelain
131 git-name-rev plumbinginterrogators
132 git-pack-objects plumbingmanipulators
133 git-pack-redundant plumbinginterrogators
134 git-pack-refs ancillarymanipulators
135 git-parse-remote synchelpers
136 git-patch-id purehelpers
137 git-peek-remote purehelpers
138 git-prune ancillarymanipulators
139 git-prune-packed plumbingmanipulators
140 git-pull mainporcelain
141 git-push mainporcelain
142 git-quiltimport foreignscminterface
143 git-read-tree plumbingmanipulators
144 git-rebase mainporcelain
145 git-receive-pack synchelpers
146 git-reflog ancillarymanipulators
147 git-relink ancillarymanipulators
148 git-repack ancillarymanipulators
149 git-config ancillarymanipulators
150 git-remote ancillarymanipulators
151 git-request-pull foreignscminterface
152 git-rerere ancillaryinterrogators
153 git-reset mainporcelain
154 git-revert mainporcelain
155 git-rev-list plumbinginterrogators
156 git-rev-parse ancillaryinterrogators
157 git-rm mainporcelain
158 git-runstatus ancillaryinterrogators
159 git-send-email foreignscminterface
160 git-send-pack synchingrepositories
161 git-shell synchelpers
162 git-shortlog mainporcelain
163 git-show mainporcelain
164 git-show-branch ancillaryinterrogators
165 git-show-index plumbinginterrogators
166 git-show-ref plumbinginterrogators
167 git-sh-setup purehelpers
168 git-ssh-fetch synchingrepositories
169 git-ssh-upload synchingrepositories
170 git-status mainporcelain
171 git-stripspace purehelpers
172 git-svn foreignscminterface
173 git-svnimport foreignscminterface
174 git-symbolic-ref plumbingmanipulators
175 git-tag mainporcelain
176 git-tar-tree plumbinginterrogators
177 git-unpack-file plumbinginterrogators
178 git-unpack-objects plumbingmanipulators
179 git-update-index plumbingmanipulators
180 git-update-ref plumbingmanipulators
181 git-update-server-info synchingrepositories
182 git-upload-archive synchelpers
183 git-upload-pack synchelpers
184 git-var plumbinginterrogators
185 git-verify-pack plumbinginterrogators
186 git-verify-tag ancillaryinterrogators
187 git-whatchanged ancillaryinterrogators
188 git-write-tree plumbingmanipulators