Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Don't suggest completion functions when 'correcting' on non-existant commands
- X-seq: zsh-workers 26240
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: Zsh Workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: Don't suggest completion functions when 'correcting' on non-existant commands
- Date: Sat, 3 Jan 2009 12:42:20 +0100
- In-reply-to: <090102184800.ZM26274@xxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Zsh Workers <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <2d460de70812310948s2ecf04e3gb13ac58311ead2f@xxxxxxxxxxxxxx> <20081231181247.GE4052@xxxxxxxxxxxxxxx> <081231104649.ZM22712@xxxxxxxxxxxxxxxxxxxxxx> <20090102225432.GI4052@xxxxxxxxxxxxxxx> <090102184800.ZM26274@xxxxxxxxxxxxxxxxxxxxxx>
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>:
> On Jan 2, 11:54pm, Frank Terbeck wrote:
> } > On Dec 31, 7:12pm, Frank Terbeck wrote:
> } > }
> } > } <http://bewatermyfriend.org/posts/2007/12-26.11-50-38-tooltime.html>
> } >
> } > That's not really a solution; it just replaces the correction prompt
> } > with a different prompt.
> }
> } Well, to me it's not really another prompt, because you're not
> } actually prompted for anything.
>
> It nevertheless stops whatever is going on and makes you hit enter, which
> is not that much better than answering "N" to a request to correct the
> command name.
Since the problem only occurs as soon as you hit enter, I don't see
the problem, that this workaround (yeah, let's call it that way) only
kicks in as soon as you hit enter.
If it detects the problem, it displays a warning below the prompt and
ignores the first enter completely. Nothing changes. So, at least for
me (and some other folks who I know use this, too) that's a lot less
annoying than the correction question.
Of course, a solution within zle would be way cleaner. I tried that,
before I wrote that accept-line wrapper back then. Obviously, I
failed - who would have guessed. :-)
> } E.g.: If it's due to a not-yet-installed piece of software you can
> } push-input the current cmdline, aptitude-install (or whatever way your
> } OS does it) and then just hit enter to have the pushed command
> } executed - with the missing program installed.
> }
> } > It might be interesting for other reasons.
> }
> } What would those reasons be? ...maybe you see use-cases I didn't see,
> } yet. :-)
>
> Well, on Ubuntu under bash when a command is not found you get told what
> to do to install it (e.g. what package to apt-get install). This could
> be the basis for something like that for zsh.
Yeah, that could probably be done. I'll take a look at it as soon as I
can find the time. :)
Regards, Frank
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
Messages sorted by:
Reverse Date,
Date,
Thread,
Author