##// END OF EJS Templates
When hg is invoked without parameters, the short list help is displayed....
kreijack@inwind.REMOVEME.it -
r846:a30f7ee3 default
parent child Browse files
Show More
@@ -286,7 +286,7 b' def show_version(ui):'
286
286
287 def help_(ui, cmd=None):
287 def help_(ui, cmd=None):
288 """show help for a given command or all commands"""
288 """show help for a given command or all commands"""
289 if cmd:
289 if cmd and cmd != 'shortlist':
290 try:
290 try:
291 i = find(cmd)
291 i = find(cmd)
292 ui.write("%s\n\n" % i[2])
292 ui.write("%s\n\n" % i[2])
@@ -329,14 +329,15 b' def help_(ui, cmd=None):'
329 ui.write("\n")
329 ui.write("\n")
330
330
331 ui.write('hg commands:\n\n')
331 ui.write('hg commands:\n\n')
332 else:
332
333 ui.write('basic hg commands (use "hg help -v" for more):\n\n')
333 if cmd == "shortlist":
334 ui.write('basic hg commands (use "hg help" for more):\n\n')
334
335
335 h = {}
336 h = {}
336 cmds = {}
337 cmds = {}
337 for c, e in table.items():
338 for c, e in table.items():
338 f = c.split("|")[0]
339 f = c.split("|")[0]
339 if not ui.verbose and not f.startswith("^"):
340 if cmd == "shortlist" and not f.startswith("^"):
340 continue
341 continue
341 if not ui.debugflag and f.startswith("debug"):
342 if not ui.debugflag and f.startswith("debug"):
342 continue
343 continue
@@ -1360,7 +1361,7 b' def parse(args):'
1360 if options["version"]:
1361 if options["version"]:
1361 return ("version", show_version, [], options, cmdoptions)
1362 return ("version", show_version, [], options, cmdoptions)
1362 elif not args:
1363 elif not args:
1363 return ("help", help_, [], options, cmdoptions)
1364 return ("help", help_, ["shortlist"], options, cmdoptions)
1364 else:
1365 else:
1365 cmd, args = args[0], args[1:]
1366 cmd, args = args[0], args[1:]
1366
1367
General Comments 0
You need to be logged in to leave comments. Login now