diff tests/test-alias.t @ 24222:02d7b5cd373b

dispatch: offer suggestions of similar-named commands When suggestions are available, we show those suggestions instead of showing some help output.
author Augie Fackler <augie@google.com>
date Tue, 10 Feb 2015 15:59:12 -0500
parents 975c4fc4a512
children b3376fba4ab9
line wrap: on
line diff
--- a/tests/test-alias.t	Mon Jan 26 15:43:13 2015 -0500
+++ b/tests/test-alias.t	Tue Feb 10 15:59:12 2015 -0500
@@ -360,9 +360,11 @@
   sub
   $ hg --cwd .. subalias > /dev/null
   hg: unknown command 'subalias'
+  (did you mean one of idalias?)
   [255]
   $ hg -R .. subalias > /dev/null
   hg: unknown command 'subalias'
+  (did you mean one of idalias?)
   [255]
 
 
@@ -370,12 +372,18 @@
 
   $ hg mainalias > /dev/null
   hg: unknown command 'mainalias'
+  (did you mean one of idalias?)
   [255]
   $ hg -R .. mainalias
   main
   $ hg --cwd .. mainalias
   main
 
+typos get useful suggestions
+  $ hg --cwd .. manalias
+  hg: unknown command 'manalias'
+  (did you mean one of idalias, mainalias, manifest?)
+  [255]
 
 shell aliases with escaped $ chars