author | Martin Geisler <mg@lazybytes.net> |
Sun, 03 May 2009 00:41:09 +0200 | |
changeset 8283 | d6134b800797 |
parent 7880 | 7ca2be800804 |
permissions | -rwxr-xr-x |
3317
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
1 |
#!/bin/sh |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
2 |
|
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
3 |
echo '% Show all commands except debug commands' |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
4 |
hg debugcomplete |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
5 |
|
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
6 |
echo |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
7 |
echo '% Show all commands that start with "a"' |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
8 |
hg debugcomplete a |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
9 |
|
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
10 |
echo |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
11 |
echo '% Do not show debug commands if there are other candidates' |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
12 |
hg debugcomplete d |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
13 |
|
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
14 |
echo |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
15 |
echo '% Show debug commands if there are no other candidates' |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
16 |
hg debugcomplete debug |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
17 |
|
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
18 |
echo |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
19 |
echo '% Do not show the alias of a debug command if there are other candidates' |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
20 |
echo '% (this should hide rawcommit)' |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
21 |
hg debugcomplete r |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
22 |
|
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
23 |
echo |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
24 |
echo '% Show the alias of a debug command if there are no other candidates' |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
25 |
hg debugcomplete rawc |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
26 |
|
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
27 |
echo |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
28 |
echo '% Show the global options' |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
29 |
hg debugcomplete --options | sort |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
30 |
|
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
31 |
echo |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
32 |
echo '% Show the options for the "serve" command' |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
33 |
hg debugcomplete --options serve | sort |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
34 |
|
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
35 |
echo |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
36 |
echo '% Show an error if we use --options with an ambiguous abbreviation' |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
37 |
hg debugcomplete --options s |
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
38 |
|
7880
7ca2be800804
add debugcommands command: an easy to parse command + option index
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
3317
diff
changeset
|
39 |
echo |
7ca2be800804
add debugcommands command: an easy to parse command + option index
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
3317
diff
changeset
|
40 |
echo '% Show all commands + options' |
7ca2be800804
add debugcommands command: an easy to parse command + option index
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
3317
diff
changeset
|
41 |
hg debugcommands |
7ca2be800804
add debugcommands command: an easy to parse command + option index
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
3317
diff
changeset
|
42 |
|
3317
399c04369a1b
fix bash completion of debug commands; add test for debugcomplete
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
43 |
exit 0 |