zsh-workers
 help / color / mirror / code / Atom feed
From: Bruce Stephens <b.stephens@isode.com>
To: zsh-workers@math.gatech.edu
Subject: Re: Command alias in non-command position
Date: 27 Aug 1998 10:53:42 +0100	[thread overview]
Message-ID: <vbvhnehhsp.fsf@snake.isode.com> (raw)
In-Reply-To: Sven Wischnowsky's message of "Thu, 27 Aug 1998 10:55:43 +0200 (MET DST)"

Sven Wischnowsky <wischnow@informatik.hu-berlin.de> writes:

> I always liked to think about joining them. Make the completion code
> return a list of possible words for a certain situation and then let
> the corection code work with this list (instead of just
> filenames). Or, integrate the correction code in the completion code,
> turning it into some kind of general `find out what we can do here'-code 
> and let correction be just a different interface for that code.
> The quote from Bruce shows that joining them may require a few more
> possibilities in describing possible words (e.g. non-existent files).

I was only thinking of non-existent files for the cases like:

	mv makefile Makefile

and the like.  Actually, I just tried this and similar examples, and
it didn't offer autocorrection, but that turns out to be because I
have mv aliased to 'nocorrect mv', presumably because of this.

Probably these cases aren't much worth bothering about, though.

My original thought was a really cut-down sort of approach, where you
could say that certain words should not be autocorrected.  So it would
use compctl-like patterns to specify words, but the result for each
word would just be a boolean.

Your idea of tying it with completion is a better one than inventing a
new mechanism, though.  The two feel a bit different (completion gets
used in the middle of editing a line, whereas spell correction gets
done after the command is allegedly complete), but they're clearly
related, so maybe they can be combined neatly.

Maybe TAB (or some other key) could do autocorrection on things as
well as completion and expansion.  That might be cool.  More likely
irritating, I suspect, but I wouldn't rule it out entirely.


      reply	other threads:[~1998-08-27 10:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-27  8:55 Sven Wischnowsky
1998-08-27  9:53 ` Bruce Stephens [this message]

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=vbvhnehhsp.fsf@snake.isode.com \
    --to=b.stephens@isode.com \
    --cc=zsh-workers@math.gatech.edu \
    /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).