public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail•com>
To: Erik Faye-Lund <kusmabite@gmail•com>
Cc: git@vger•kernel.org, ziade.tarek@gmail•com
Subject: help.autoCorrect prefix selection considered a bit dangerous
Date: Mon, 19 Nov 2018 21:35:00 +0100	[thread overview]
Message-ID: <87y39oztzf.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <1290787239-4508-1-git-send-email-kusmabite@gmail.com>

Replying to this blast from the past:
https://public-inbox.org/git/1290787239-4508-1-git-send-email-kusmabite@gmail.com/

I apparently like to live dangerously and have help.autoCorrect
enabled. I just had:

    git puss

Auto-corrected to:

    git push

When I meant:

    git pull

(For those wondering how I could have mistyped that, "l" and "s" are
right next to each other on a Dvorak layout).

As seen in the E-Mail from 2010 this intentional, i.e. "pull" is pruned
since the "pu" prefix isn't matched, but "pus" is. This was meant to
correct e.g. "git st" to "git status".

I don't have time to poke at this now, but wonder if:

 1) The correction facility shouldn't at least have a list of "this does
    stuff over the wire" commands and would then use a more conservative
    estimate.

 2) Whether we can do better with typo detection. E.g. add commands like
    "pull" to the list if we have a long enough prefix for them, and if
    the number of characters entered matches the number of characters in
    another command.

  parent reply	other threads:[~2018-11-19 20:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 12:23 bug: unexpected output for "git st" + suggestion Tarek Ziadé
2010-11-23 12:40 ` Nguyen Thai Ngoc Duy
2010-11-23 12:49   ` Tarek Ziadé
2010-11-23 13:08     ` Nguyen Thai Ngoc Duy
2010-11-23 13:18       ` Tarek Ziadé
2010-11-23 13:26         ` Nguyen Thai Ngoc Duy
2010-11-23 20:38         ` Andreas Schwab
2010-11-23 12:43 ` Sylvain Rabot
2010-11-23 13:22 ` Erik Faye-Lund
2010-11-23 13:47   ` Tarek Ziadé
2010-11-23 13:56     ` Erik Faye-Lund
2010-11-23 13:58       ` Tarek Ziadé
2010-11-23 19:11         ` [PATCH] help: always suggest common-cmds if prefix of cmd Erik Faye-Lund
2010-11-24 19:49           ` Junio C Hamano
2010-11-24 20:20             ` Erik Faye-Lund
2010-11-24 23:53               ` Erik Faye-Lund
2010-11-25  4:49               ` Junio C Hamano
2010-11-25 10:39                 ` Erik Faye-Lund
2010-11-26 16:00                   ` [PATCH v3] " Erik Faye-Lund
2010-11-27  0:18                     ` Junio C Hamano
2010-11-29 11:20                       ` Erik Faye-Lund
2010-11-29 16:40                         ` Jonathan Nieder
2010-11-29 16:53                           ` Erik Faye-Lund
2010-11-29 17:44                         ` Junio C Hamano
2010-12-01 14:33                           ` Erik Faye-Lund
2018-11-19 20:35                     ` Ævar Arnfjörð Bjarmason [this message]
2018-11-20  3:23                       ` help.autoCorrect prefix selection considered a bit dangerous Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y39oztzf.fsf@evledraar.gmail.com \
    --to=avarab@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=kusmabite@gmail$(echo .)com \
    --cc=ziade.tarek@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox