From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2372 invoked by alias); 22 Jul 2013 18:30:39 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31559 Received: (qmail 22157 invoked from network); 22 Jul 2013 18:30:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: neutral (ns1.primenet.com.au: 209.85.215.175 is neither permitted nor denied by SPF record at ntlworld.com) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-proxyuser-ip:date:from:to:subject:message-id:in-reply-to :references:x-mailer:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=xu9Mvl2Svuq+VZDwIx+9oFwF2jsA+WkTqd/EkucJ4jQ=; b=J+i0JzuMvwGxia9O34Bm+KcvU+yvDzv1tfF/YHzSxXcGO/7rQCtEuwE83Z+vTMt3Re h/p2bkW2uVnQLmMlVezbx5Lfg4jJurIsEIj4HeEY8HWm50RRWzcvdCTRBVpUeYzWOSe4 laW5NIbgLIsMrCt05bJOIKDWAYme2AbSw+nGi0JnqNyxZMG9A1nAuGzZi2K6FneLXo1m c9dfXSHkaYhled9sbxqXQOban7992/VO1QzgqV5A2s6jb0+7iJ24kKUxzaviTiIowMG8 cYmfMlUDbcnefZOmyhNemwwV9QzWlSbbEXkEUhhE92y11HsG+GwI7VJLEdzJn3dA1Cjv +wXg== X-Received: by 10.15.42.129 with SMTP id u1mr28961561eev.116.1374517816510; Mon, 22 Jul 2013 11:30:16 -0700 (PDT) X-ProxyUser-IP: 86.6.30.159 Date: Mon, 22 Jul 2013 19:30:12 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: interactivecomments and preexec Message-ID: <20130722193012.3a0a4f9f@pws-pc.ntlworld.com> In-Reply-To: <20130722105332.2e7e8366@pwslap01u.europe.root.pri> References: <20130721194524.GC10400@chaz.gmail.com> <20130722105332.2e7e8366@pwslap01u.europe.root.pri> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnV5cGVZFJXioIUl0wm3r7MoHF35vwjo1SrmFDDTovpNuVu4nEyxEKCDeD21ux1JvF4Vlm2 On Mon, 22 Jul 2013 10:53:32 +0100 Peter Stephenson wrote: > On Sun, 21 Jul 2013 13:28:17 -0700 > Bart Schaefer wrote: > > Comments are stripped before alias expansion. > > I think you're slightly missing the issue (as I did, until I looked more > closely): what preexec shows is inconsistent, giving you the unexpanded > alias first, then a bit of the expanded alias, then the argument. This > can't be right. Not just in preexec, either; if you use up-arrow, you get the extraneous "#" in the middle of the line. Try this. Seems to work here but not extensively tested elsewhere. diff --git a/Src/lex.c b/Src/lex.c index ac87e5e..4a9b110 100644 --- a/Src/lex.c +++ b/Src/lex.c @@ -778,6 +778,7 @@ gettok(void) bptr = tokstr = (char *)hcalloc(bsiz = 32); add(c); } + ihwend(); while ((c = ingetc()) != '\n' && !lexstop) { hwaddc(c); addtoline(c); -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/