Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: named dirs and corrections
- X-seq: zsh-users 14470
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: named dirs and corrections
- Date: Fri, 9 Oct 2009 19:33:05 +0100
- In-reply-to: <45ebb5590910090737wf962b36kdf0851e686deb047@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <45ebb5590910090737wf962b36kdf0851e686deb047@xxxxxxxxxxxxxx>
On Fri, 9 Oct 2009 16:37:00 +0200
Andreas Sahlbach <andreas.sahlbach@xxxxxxxxx> wrote:
> Is it possible to give cdpath directories a higher priority than corrections
> during a "cd"?
I think the simple answer is "no". Spelling correction is very simple
and doesn't know about--well, anything very much beyond the fact that
it's on a word that might want to be treated as a command word, or a
file.
Hmmm... having looked at the code I can see that if you set the AUTOCD
option and type a directory name (no cd), then correction is correctly
applied to the command argument to treat it as a diretory in cdpath
(along, of course, with all the other possibilities that could occur
here). This isn't quite what you want, of course.
The vague, touchy-feely it's-probably-never-actually-going-to-happen
answer is that a better way of doing spelling correction would be to use
the completion system but with a different interface to prompt for
corrections.
A slightly less hopeless answer is that it's not rocket science to
create a widget that runs when you hit <return> on a command line that
does spelling correction that could be tweaked, but it's still not
trivial.
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author