Skip to contentSkip to conversation

Surprising "Did you mean this?"

small bug Matthieu Moy 3 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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,

Signature · 1 line
Matthieu
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Matthieu" == Matthieu Moy <[email protected]> writes:

Matthieu> I would have expected git to propose me "tag" (1 character Matthieu> removal), while "status" is quite far from "tags" (remove g, Matthieu> add u, add another t, shuffle and you're there).

It looks like the addition of a character at the end (more exactly the deletion of a character in the possible substitution) is bogus. I am testing a patch.

Sam

Signature · 1 line
Samuel Tardieu -- [email protected] -- http://www.rfc1149.net/
#2 lore raw
In reply to Matthieu Moy
Quoted 7 lines · Matthieu Moy

Hi,

The following is quite surprising:

  $ git tags 
  git: 'tags' is not a git-command. See 'git --help'.
Quoted 7 lines

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.

Signature · 3 lines
Andreas Ericsson                   [email protected]
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231