Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug: Wrong completion of $(( $(!cmd
- X-seq: zsh-workers 23127
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>, Zsh Hackers <zsh-workers@xxxxxxxxxx>
- Subject: Re: Bug: Wrong completion of $(( $(!cmd
- Date: Tue, 23 Jan 2007 07:23:44 -0800
- In-reply-to: <200701231304.l0ND4b3t011195@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <slrnepu2ml.2tv.joerg@xxxxxxxxxxxx> <20070122234306.GA24536@xxxxxxxxxxxxxxx> <200701231304.l0ND4b3t011195@xxxxxxxxxxxxxx>
On Jan 23, 1:04pm, Peter Stephenson wrote:
}
} The problem is somewhere here (in lex.c). If dquote_parse() returns
} non-zero it's an error indication, not a character, so the hungetc(c)
} is definitely wrong in that case.
I don't think that's true. If you look at the tail end of dquote_parse()
you'll see that if lexstop is false the return value of dquote_parse() is
overloaded -- it's both an error indication AND the most recently read
character from the input stream. That's what hungetc() is trying to put
back in that spot in cmd_or_math().
That doesn't make it correct, but that's what's going on. There must be
(or have been at some past time) some other reason higher up the parse
tree why that final character needed to be retained.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author