Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Remaining zsh3.0-pre2 bugs
- X-seq: zsh-workers 1601
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: schaefer@xxxxxxx
- Subject: Re: Remaining zsh3.0-pre2 bugs
- Date: Wed, 10 Jul 1996 21:48:01 +0200 (MET DST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <960710121111.ZM4060@xxxxxxxxxxxxxxxxxxxxxxx> from Bart Schaefer at "Jul 10, 96 12:11:09 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> } > } In that case zsh simply gives up the completion
> } > } attempt, restores the original line and returns.
> } >
> } > Why is that necessary? Maybe it's necessary if the word *ends* in the
> } > previous line for some reason, but ...
> }
> } The problem is that that:
> }
> } % echo 'z'\
> } > l<TAB>
> }
> } Here get_comp_string removes the quotes around 'z' but it does not work
> } since the already entered part cannot be modified. The quotes have to be
> } removed for completing filenames. This later causes a SEGV.
>
> Well, then, why not catch that special case (backslash-newline) and let
> other cases of embedded newlines keep working? Patch below.
It did not study your patch too much so perhaps I just do not see something
obvious but I do not understand what is this wb < (oll - ll) check?
But not only backslash-newline is the problem. It was just an example.
Try completing after
% echo '***
> ***'
Does it work with your patch? Here makecomplist() wants to modify the
line. Note that my patch does not completely disables completion after a
backslash-newline. It just disables it when the current word starts in an
already entered line. And even in that case completion is possible after
executing push-line-or-edit. It is seems that it's not easy to correctly
handle this special and it does not worth it since it occurs very rarely.
> There's one other bug that this patch does NOT address; and maybe it's not
> a bug at all. However, here's the example:
>
> zagzig<6> touch cegi efgh
> zagzig<7> echo c'e<TAB>
> zagzig<7> echo c'efgh
>
> If I do it with TWO quotes (I don't have rcquotes set):
>
> zagzig<8> echo c''e<TAB>
> zagzig<8> echo cegi
>
> zagzig<9> echo c'e'<TAB>
> zagzig<9> echo cegi
>
> And yet:
>
> zagzig<10> echo c'e'<C-b><TAB> <-- Complete inside second quote
> zagzig<10> echo c'efg ' <-- Cursor ends on second quote
When you inside a quoted string zsh assumes that the word begins after the
quote and ignores the part of the word before the quote. In fact the
quotes is treated as a space in that case.
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author