[small bug] Surprising "Did you mean this?"

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[small bug] Surprising "Did you mean this?"

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:45:40

Hi,

The following is quite surprising:

  $ git tags 
  git: 'tags' is not a git-command. See 'git --help'.
  
  Did you mean this?
          status
  
I would have expected git to propose me "tag" (1 character removal),
while "status" is quite far from "tags" (remove g, add u, add another
t, shuffle and you're there).

my 2 cents,

-- 
Matthieu

Re: [small bug] Surprising "Did you mean this?"

From: Andreas Ericsson <hidden>
Date: 2016-06-15 22:45:40

Matthieu Moy wrote:
Hi,

The following is quite surprising:

  $ git tags 
  git: 'tags' is not a git-command. See 'git --help'.
  
  Did you mean this?
          status
  
I would have expected git to propose me "tag" (1 character removal),
while "status" is quite far from "tags" (remove g, add u, add another
t, shuffle and you're there).
That's the Deveraux(?) addendum in action. shuffle+replace = 3 in the
distance score, while remove = 4 (I think).

Typos by users accustomed to computers are more often of the shuffle
(haed vs head) or replace (hwad vs head) kind, while those less
accustomed often fumble more and press more keys. For this case though,
I agree it gives a rather strange result.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help