[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is direxpand available yet (to fix dirspell)?

From: John Caruso
Subject: Re: Is direxpand available yet (to fix dirspell)?
Date: Wed, 9 Jan 2013 18:27:50 +0000 (UTC)
User-agent: slrn/ (Win32)

In article <address@hidden>, Chet Ramey wrote:
> On 1/8/13 5:38 PM, John Caruso wrote:
>> So just to verify: there's no way in bash 4.2.0 through 4.2.28 to make
>> dirspell work correctly?  The only fix is the direxpand option?
> Yes.  Through 4.2.28, the dirspell option will cause the filename to be
> rewritten with spelling correction internally, but the corrected filename
> will not be rewritten on the command line.

Huh--that's not what I'm seeing.  This is what I get from stock bash 4.2
with no patches (and bash 4.2.10 and 4.2.24 behaved the same way):

   bash-4.2$ shopt -s dirspell
   bash-4.2$ ls /ect/passwd<TAB>
   /ect/passwd: No such file or directory

The TAB there produces a space (and no bell) as though dirspell is in
fact acting on the filename, but executing the command shows that bash
is still using the misspelled filename internally.  So as far as I can
tell (and unless there's some other use case I'm missing), dirspell no
longer worked from bash 4.2 through 4.2.28.  And direxpand does indeed
make dirspell work again (thanks for that)--in fact it seems like it
doesn't do anything other than make dirspell work again.

Having dirspell/direxpand brings bash almost up to par with tcsh's
killer spelling correction.  I think all that's missing now is command
spelling correction like the following in tcsh:

   tcsh-6.12$ set correct=cmd
   tcsh-6.12$ set prompt3="Don't you mean: %R? "
   tcsh-6.12$ chmd 666 beelzebub

   Don't you mean: chmod 666 beelzebub? yes

Part of the reason I was asking about dirspell in the first place is that
path and command spelling correction are the places where tcsh still has
an edge over other shells.

- John

reply via email to

[Prev in Thread] Current Thread [Next in Thread]