equal
deleted
inserted
replaced
336 def helpcmd(name, subtopic=None): |
336 def helpcmd(name, subtopic=None): |
337 try: |
337 try: |
338 aliases, entry = cmdutil.findcmd(name, commands.table, |
338 aliases, entry = cmdutil.findcmd(name, commands.table, |
339 strict=unknowncmd) |
339 strict=unknowncmd) |
340 except error.AmbiguousCommand as inst: |
340 except error.AmbiguousCommand as inst: |
341 # py3k fix: except vars can't be used outside the scope of the |
341 # py3 fix: except vars can't be used outside the scope of the |
342 # except block, nor can be used inside a lambda. python issue4617 |
342 # except block, nor can be used inside a lambda. python issue4617 |
343 prefix = inst.args[0] |
343 prefix = inst.args[0] |
344 select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix) |
344 select = lambda c: cmdutil.parsealiases(c)[0].startswith(prefix) |
345 rst = helplist(select) |
345 rst = helplist(select) |
346 return rst |
346 return rst |