zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk
Subject: Re: Bug in spell correction of directories for cd
Date: Thu, 8 May 2008 09:53:07 +0100	[thread overview]
Message-ID: <20080508095307.5dd54625@news01> (raw)
In-Reply-To: <20080507233234.GQ13554@prunille.vinc17.org>

On Thu, 8 May 2008 01:32:34 +0200
Vincent Lefevre <vincent@vinc17.org> wrote:
> This has annoyed me from some time, but spell corrections of directories
> doesn't work correctly. I think it doesn't take the cdpath into account
> or something like that.

As far as I can see the only place where directories are handled specially
during spell-checking is in command position with AUTO_CD set.

Spell checking is very much simpler than completion and has virtually no
knowledge of context beyond whether or not the word is in command position.
It's in the main shell, which makes it hard to use all the pre-existing
correction code in completion.  Probably the only sensible way to improve
it would be to run something when the line editor exited.  Even that's
quite hard to set up since it would have to scan every word as if it were
being completed, or something such.

You can, of course, set up correction so that you can invoke it directly
from the line editor, but it's not the same as having it checked as you go
along.

Hmm...  I wonder if there's scope for an even-more-magic-space command that
sees if a shell argument has just been completed and if it should spell
check it?  You'd need a long list either of exceptions or inclusions, which
might have to be narrowed down by argument position.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


  reply	other threads:[~2008-05-08  8:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07 23:32 Vincent Lefevre
2008-05-08  8:53 ` Peter Stephenson [this message]
2008-05-08 14:59   ` Bart Schaefer

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=20080508095307.5dd54625@news01 \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).