Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Revised dohistexpand()



hzoli@xxxxxxxxxx wrote:
> To summarize my opinion, I do not like this patch very much.  It
> doesn't fixe s any bugs but it introduces one.  I normally bind
> magic-space to space so each time I hit space the whole line I typed
> so far goes through the lexer but the time spet there is unnoticable
> even on a slow 386/DX40 system (which I still use at home).

I'm not insistent on this patch, but anyway here's my response...

Your magic-space problems with single quotes are certainly real ---
you'd have to use \!, which does work properly in the patch (perhaps I
didn't make that clear enough) --- but if you really don't consider
expanding previous history references when trying to complete a
subsequent word a bug, our views differ substantially.  In fact, for
people not using magic-space (me, obviously --- I should guess most
people, since expansion is just a tab away, but I expect I'm about to
generate volumes of irate mail from magic-spacers) it's a lot more
important.  Unfortunately there's no easy way to reconcile the two ---
and if there is a way, I have a feeling I'd rather not see it.

Clearly people's priorities differ, but if I really have to put up
with increasing amounts of interpenetrating cruft when trying to clean
up the code, I have to say I'm rapidly going to lose interest.  To use
one call to the lexer in zle_tricky.c might be regarded as a
misfortune; to use two looks like carelessness (as Oscar Wilde put
it).

Still, now I've found out what all this code does, maybe I can work
around it some other way.  I'm hoping, eventually, to modify the
history code so that only the lines actually typed are stored, with
the word separation in a list of numbers (this uses less space since
there are not separate lexical and literal histories, while you get
all the benefits of both, and I hate HISTSPACE, and I'd like zsh to be
8-bit clean) --- maybe we can combine this so that the new history
line becomes the editing line after history expansion, so you can call
the lexer but don't need the addtoline() bits.  (It still won't fix
the expanding-in-the-wrong-word bug, though.)

-- 
Peter Stephenson <P.Stephenson@xxxxxxxxxxxxx>  Tel: +44 1792 205678 extn. 4461
WWW:  http://python.swan.ac.uk/~pypeters/      Fax: +44 1792 295324
Department of Physics, University of Wales, Swansea,
Singleton Park, Swansea, SA2 8PP, U.K.



Messages sorted by: Reverse Date, Date, Thread, Author