##// END OF EJS Templates
fix bash completion of debug commands; add test for debugcomplete...
Alexis S. L. Carvalho -
r3317:399c0436 default
parent child Browse files
Show More
@@ -0,0 +1,39 b''
1 #!/bin/sh
2
3 echo '% Show all commands except debug commands'
4 hg debugcomplete
5
6 echo
7 echo '% Show all commands that start with "a"'
8 hg debugcomplete a
9
10 echo
11 echo '% Do not show debug commands if there are other candidates'
12 hg debugcomplete d
13
14 echo
15 echo '% Show debug commands if there are no other candidates'
16 hg debugcomplete debug
17
18 echo
19 echo '% Do not show the alias of a debug command if there are other candidates'
20 echo '% (this should hide rawcommit)'
21 hg debugcomplete r
22
23 echo
24 echo '% Show the alias of a debug command if there are no other candidates'
25 hg debugcomplete rawc
26
27 echo
28 echo '% Show the global options'
29 hg debugcomplete --options | sort
30
31 echo
32 echo '% Show the options for the "serve" command'
33 hg debugcomplete --options serve | sort
34
35 echo
36 echo '% Show an error if we use --options with an ambiguous abbreviation'
37 hg debugcomplete --options s
38
39 exit 0
@@ -0,0 +1,150 b''
1 % Show all commands except debug commands
2 add
3 addremove
4 annotate
5 archive
6 backout
7 bundle
8 cat
9 clone
10 commit
11 copy
12 diff
13 export
14 grep
15 heads
16 help
17 identify
18 import
19 incoming
20 init
21 locate
22 log
23 manifest
24 merge
25 outgoing
26 parents
27 paths
28 pull
29 push
30 recover
31 remove
32 rename
33 revert
34 rollback
35 root
36 serve
37 showconfig
38 status
39 tag
40 tags
41 tip
42 unbundle
43 update
44 verify
45 version
46
47 % Show all commands that start with "a"
48 add
49 addremove
50 annotate
51 archive
52
53 % Do not show debug commands if there are other candidates
54 diff
55
56 % Show debug commands if there are no other candidates
57 debugancestor
58 debugcheckstate
59 debugcomplete
60 debugconfig
61 debugdata
62 debugforget
63 debugindex
64 debugindexdot
65 debugrawcommit
66 debugrebuildstate
67 debugrename
68 debugsetparents
69 debugstate
70 debugundo
71 debugwalk
72
73 % Do not show the alias of a debug command if there are other candidates
74 % (this should hide rawcommit)
75 recover
76 remove
77 rename
78 revert
79 rollback
80 root
81
82 % Show the alias of a debug command if there are no other candidates
83 rawcommit
84
85 % Show the global options
86 --config
87 --cwd
88 --debug
89 --debugger
90 --help
91 --lsprof
92 --noninteractive
93 --profile
94 --quiet
95 --repository
96 --time
97 --traceback
98 --verbose
99 --version
100 -R
101 -h
102 -q
103 -v
104 -y
105
106 % Show the options for the "serve" command
107 --accesslog
108 --address
109 --config
110 --cwd
111 --daemon
112 --daemon-pipefds
113 --debug
114 --debugger
115 --errorlog
116 --help
117 --ipv6
118 --lsprof
119 --name
120 --noninteractive
121 --pid-file
122 --port
123 --profile
124 --quiet
125 --repository
126 --stdio
127 --style
128 --templates
129 --time
130 --traceback
131 --verbose
132 --version
133 --webdir-conf
134 -6
135 -A
136 -E
137 -R
138 -a
139 -d
140 -h
141 -n
142 -p
143 -q
144 -t
145 -v
146 -y
147
148 % Show an error if we use --options with an ambiguous abbreviation
149 hg: command 's' is ambiguous:
150 serve showconfig status
@@ -3137,7 +3137,7 b' def findpossible(ui, cmd):'
3137 found = a
3137 found = a
3138 break
3138 break
3139 if found is not None:
3139 if found is not None:
3140 if aliases[0].startswith("debug"):
3140 if aliases[0].startswith("debug") or found.startswith("debug"):
3141 debugchoice[found] = (aliases, table[e])
3141 debugchoice[found] = (aliases, table[e])
3142 else:
3142 else:
3143 choice[found] = (aliases, table[e])
3143 choice[found] = (aliases, table[e])
General Comments 0
You need to be logged in to leave comments. Login now