This is an archive of the discontinued Mercurial Phabricator instance.

dispatch: don't show list of commands on bogus command
ClosedPublic

Authored by martinvonz on Aug 1 2018, 2:53 PM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

martinvonz created this revision.Aug 1 2018, 2:53 PM
pulkit accepted this revision.Aug 1 2018, 4:45 PM
pulkit added a subscriber: pulkit.

I like this change. Thanks!

This revision was automatically updated to reflect the committed changes.