From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: schaefer@nbn.com
Cc: zsh-workers@math.gatech.edu
Subject: Re: Remaining zsh3.0-pre2 bugs
Date: Wed, 10 Jul 1996 21:48:01 +0200 (MET DST) [thread overview]
Message-ID: <199607101948.VAA29276@bolyai.cs.elte.hu> (raw)
In-Reply-To: <960710121111.ZM4060@candle.brasslantern.com> from Bart Schaefer at "Jul 10, 96 12:11:09 pm"
> } > } 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
next prev parent reply other threads:[~1996-07-10 19:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-06 22:59 Huy Le
1996-07-07 5:29 ` Bart Schaefer
1996-07-07 5:53 ` Bart Schaefer
1996-07-07 7:07 ` Bart Schaefer
1996-07-07 6:08 ` Bart Schaefer
1996-07-07 9:06 ` Zefram
1996-07-08 0:48 ` Zoltan Hidvegi
1996-07-08 4:22 ` Bart Schaefer
1996-07-08 6:21 ` Bart Schaefer
1996-07-08 7:57 ` Zefram
1996-07-08 8:48 ` Bart Schaefer
1996-07-09 1:32 ` Zoltan Hidvegi
1996-07-09 9:08 ` Bart Schaefer
1996-07-09 14:06 ` Zoltan Hidvegi
1996-07-10 19:11 ` Bart Schaefer
1996-07-10 19:48 ` Zoltan Hidvegi [this message]
1996-07-11 0:04 ` Bart Schaefer
1996-07-11 12:16 ` Zoltan Hidvegi
1996-07-11 16:45 ` Bart Schaefer
1996-07-08 14:28 ` Zoltan Hidvegi
1996-07-08 6:38 ` Bart Schaefer
1996-07-11 8:11 ` Peter Stephenson
1996-07-11 12:51 ` Redirection bug fix Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199607101948.VAA29276@bolyai.cs.elte.hu \
--to=hzoli@cs.elte.hu \
--cc=schaefer@nbn.com \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).