653 |
653 |
654 if opts.get('options'): |
654 if opts.get('options'): |
655 options = [] |
655 options = [] |
656 otables = [globalopts] |
656 otables = [globalopts] |
657 if cmd: |
657 if cmd: |
658 aliases, entry = cmdutil.findcmd(ui, cmd, table) |
658 aliases, entry = cmdutil.findcmd(cmd, table, False) |
659 otables.append(entry[1]) |
659 otables.append(entry[1]) |
660 for t in otables: |
660 for t in otables: |
661 for o in t: |
661 for o in t: |
662 if o[0]: |
662 if o[0]: |
663 options.append('-%s' % o[0]) |
663 options.append('-%s' % o[0]) |
664 options.append('--%s' % o[1]) |
664 options.append('--%s' % o[1]) |
665 ui.write("%s\n" % "\n".join(options)) |
665 ui.write("%s\n" % "\n".join(options)) |
666 return |
666 return |
667 |
667 |
668 ui.write("%s\n" % "\n".join(util.sort(cmdutil.findpossible(ui, cmd, table)))) |
668 ui.write("%s\n" % "\n".join(util.sort(cmdutil.findpossible(cmd, table)))) |
669 |
669 |
670 def debugfsinfo(ui, path = "."): |
670 def debugfsinfo(ui, path = "."): |
671 file('.debugfsinfo', 'w').write('') |
671 file('.debugfsinfo', 'w').write('') |
672 ui.write('exec: %s\n' % (util.checkexec(path) and 'yes' or 'no')) |
672 ui.write('exec: %s\n' % (util.checkexec(path) and 'yes' or 'no')) |
673 ui.write('symlink: %s\n' % (util.checklink(path) and 'yes' or 'no')) |
673 ui.write('symlink: %s\n' % (util.checklink(path) and 'yes' or 'no')) |
1270 if with_version: |
1270 if with_version: |
1271 version_(ui) |
1271 version_(ui) |
1272 ui.write('\n') |
1272 ui.write('\n') |
1273 |
1273 |
1274 try: |
1274 try: |
1275 aliases, i = cmdutil.findcmd(ui, name, table) |
1275 aliases, i = cmdutil.findcmd(name, table, False) |
1276 except cmdutil.AmbiguousCommand, inst: |
1276 except cmdutil.AmbiguousCommand, inst: |
1277 select = lambda c: c.lstrip('^').startswith(inst.args[0]) |
1277 select = lambda c: c.lstrip('^').startswith(inst.args[0]) |
1278 helplist(_('list of commands:\n\n'), select) |
1278 helplist(_('list of commands:\n\n'), select) |
1279 return |
1279 return |
1280 |
1280 |