zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: schaefer@nbn.com
Cc: A.Main@dcs.warwick.ac.uk, zsh-workers@math.gatech.edu
Subject: Re: Remaining zsh3.0-pre2 bugs
Date: Tue, 9 Jul 1996 16:06:16 +0200 (MET DST)	[thread overview]
Message-ID: <199607091406.QAA15086@bolyai.cs.elte.hu> (raw)
In-Reply-To: <960709020813.ZM30009@candle.brasslantern.com> from Bart Schaefer at "Jul 9, 96 02:08:11 am"

> } > But that doesn't work for completions with embedded newlines, even when
> } > a successful completion is possible:
> } 
> } It fails because zsh sees that the current word starts in the previous
> } already entered line.
> 
> Where's that happening?  Not in get_comp_string() ...

Certainly not.  The wb < 0 check does that what you have just deleted in the
patch you sent.

> 
> } 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.

> Hmm.  Your patch does a couple of things.  One, it removes the loop that
> folds embedded newlines into semicolons; two, it attempts to save and

Yes, it seems that it is not necessary.  That mainly caused problems after
a backslash <newline>.  Perhaps that's the bug mentioned in Etc/BUGS.

> restore the cursor position.  There's one bogus compiler warning:
> 
> zle_tricky.c: In function `docomplete':
> zle_tricky.c:500: warning: `ocs' might be used uninitialized in this function
> 
> I cleared this by initializing ocs = 0 in the declaration.

gcc is wrong here but I agree that we have to make it happy.

> By the way, there are block-locals named ocs and ol used in various
> places in docomplete(), which could lead to confusion.  I didn't try
> to fix that, though.

I do not think that confusing.  These are just temporary variables.  And
ol/ocs always store some previous line/position so the usage is
consistent.

> Anyway, after the newlines-to-semicolons thing is removed, it doesn't
> seem to make any difference whether (wb < 0 || we < 0 || cs < 0).  I

This is still necessary and it is completely unrelated to the newlines to
semicolons change.  There was nothing wrong about converting unquited
newlines to semicolons.  It worked well.  But I removed it because I think
it is unnecessary.

Zoltan



  reply	other threads:[~1996-07-09 14:27 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 [this message]
1996-07-10 19:11                 ` Bart Schaefer
1996-07-10 19:48                   ` Zoltan Hidvegi
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=199607091406.QAA15086@bolyai.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=A.Main@dcs.warwick.ac.uk \
    --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).