comparison tests/test-help.t @ 38787:5199c5b6fd29

dispatch: don't show list of commands on bogus command If a command is ambiguous, you get this: $ hg ve hg: command 've' is ambiguous: verify version [255] If you typo a command, you get this: $ hg comit hg: unknown command 'comit' (did you mean one of commit, incoming, mycommit?) [255] But if you completely mistype a command so it no longer looks like any existing commands, you get a full list of commands. That might be useful the first time you use Mercurial, but after that it's probably more annoying than help, especially if you have the pager enabled and have a short terminal. Let's instead give a short hint telling the user to run `hg help` for more help. Differential Revision: https://phab.mercurial-scm.org/D4024
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 24 Jul 2018 10:22:07 -0700
parents 0a57945aaf7f
children 7c6044634957
comparison
equal deleted inserted replaced
38786:28d8b5f49b4d 38787:5199c5b6fd29
650 (try 'hg help --keyword foo') 650 (try 'hg help --keyword foo')
651 [255] 651 [255]
652 652
653 $ hg skjdfks 653 $ hg skjdfks
654 hg: unknown command 'skjdfks' 654 hg: unknown command 'skjdfks'
655 Mercurial Distributed SCM 655 (use 'hg help' for a list of commands)
656
657 basic commands:
658
659 add add the specified files on the next commit
660 annotate show changeset information by line for each file
661 clone make a copy of an existing repository
662 commit commit the specified files or all outstanding changes
663 diff diff repository (or selected files)
664 export dump the header and diffs for one or more changesets
665 forget forget the specified files on the next commit
666 init create a new repository in the given directory
667 log show revision history of entire repository or files
668 merge merge another revision into working directory
669 pull pull changes from the specified source
670 push push changes to the specified destination
671 remove remove the specified files on the next commit
672 serve start stand-alone webserver
673 status show changed files in the working directory
674 summary summarize working directory state
675 update update working directory (or switch revisions)
676
677 (use 'hg help' for the full list of commands or 'hg -v' for details)
678 [255] 656 [255]
679 657
680 Typoed command gives suggestion 658 Typoed command gives suggestion
681 $ hg puls 659 $ hg puls
682 hg: unknown command 'puls' 660 hg: unknown command 'puls'