##// END OF EJS Templates
alias: fall back to normal error handling for ambigious commands (fixes issue2475)
Steve Losh -
r12932:ab93029a stable
parent child Browse files
Show More
@@ -453,7 +453,7 b' def _checkshellalias(ui, args):'
453 cmd = args[0]
453 cmd = args[0]
454 try:
454 try:
455 aliases, entry = cmdutil.findcmd(cmd, cmdtable, lui.config("ui", "strict"))
455 aliases, entry = cmdutil.findcmd(cmd, cmdtable, lui.config("ui", "strict"))
456 except error.UnknownCommand:
456 except (error.AmbiguousCommand, error.UnknownCommand):
457 commands.norepo = norepo
457 commands.norepo = norepo
458 os.chdir(cwd)
458 os.chdir(cwd)
459 return
459 return
@@ -29,6 +29,11 b''
29 > mcount = !hg log \$@ --template='.' | wc -c | sed -e 's/ //g'
29 > mcount = !hg log \$@ --template='.' | wc -c | sed -e 's/ //g'
30 > rt = root
30 > rt = root
31 > tglog = glog --template "{rev}:{node|short}: '{desc}' {branches}\n"
31 > tglog = glog --template "{rev}:{node|short}: '{desc}' {branches}\n"
32 > idalias = id
33 > idaliaslong = id
34 > idaliasshell = !echo test
35 > parentsshell1 = !echo one
36 > parentsshell2 = !echo two
32 >
37 >
33 > [defaults]
38 > [defaults]
34 > mylog = -q
39 > mylog = -q
@@ -194,6 +199,35 b' simple shell aliases'
194 o 0:e63c23eaa88a: 'foo'
199 o 0:e63c23eaa88a: 'foo'
195
200
196
201
202
203 shadowing
204
205 $ hg i
206 hg: command 'i' is ambiguous:
207 idalias idaliaslong idaliasshell identify import incoming init
208 [255]
209 $ hg id
210 7e7f92de180e tip
211 $ hg ida
212 hg: command 'ida' is ambiguous:
213 idalias idaliaslong idaliasshell
214 [255]
215 $ hg idalias
216 7e7f92de180e tip
217 $ hg idaliasl
218 7e7f92de180e tip
219 $ hg idaliass
220 test
221 $ hg parentsshell
222 hg: command 'parentsshell' is ambiguous:
223 parentsshell1 parentsshell2
224 [255]
225 $ hg parentsshell1
226 one
227 $ hg parentsshell2
228 two
229
230
197 shell aliases with global options
231 shell aliases with global options
198
232
199 $ hg init sub
233 $ hg init sub
General Comments 0
You need to be logged in to leave comments. Login now