From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15266 invoked from network); 1 Sep 2021 18:27:48 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Sep 2021 18:27:48 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1630520868; b=flZIOrS0v77a0XVKRDRsXpIf1/cI8XCEi7kTZE6uaN1+ZPYKlVgpSUoT+XYQY5lbYs3KO7apsC MWw2aOaUljsoScUexGmdrGIqJO15uWmB5s/Iu4DMK6/eYzYzUwZWWE65fFGbg1peYymuJqtK49 RDEbPA2V8cuP7bqTvJjnmxxJEOV6PVurYoGqG/SPXACVWnVunOQWoJtk4++Ix2ilKOJDgEF7S8 8MDzJSWAdyHW2nj/adfoKsnxxmGP3rfMiyOTo8l0Q6lfhg2fsCoIgCSXSojXdJnJ+1L8VCWeRI 9trnLWmdlohZ+HbiTo0dvHd38U3iTu/48/YdrjEIWkAx+Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay8-d.mail.gandi.net) smtp.remote-ip=217.70.183.201; dmarc=none header.from=chazelas.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1630520868; bh=EMyy9j0HwR2yVrS5D3Kdre8KWdEdy68OjXvh1rwXOp8=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature; b=FUVxHvlC87lgH8GfMsjay8K3lsRhv3T3YEYmy3Ml25DhD1gv2hwbOtrrQOe9JaaqP5cDIUAq+E tiu249K0uGLYbgFXXYe9ANT3kc9jpVNIetxnVP2afvJpTq49C1/Eyp3wrg5SIDUj2aTO5Ox+Gu SfsUjbpnig/hUJamto78Y1CFkp1WPJ6VbkaV7BCD2Q0F6RknIqo0Ie/6hJ2uM/vpLn1tK1iQ3r PodNPYsP27jGvwyKScvRK2R8mfX9WiYG/8zk2grJBY+36P8sN7obKtWynPJ2q1vmRZbub2E6Qd eHEN2mdHGrmBDx70BBGaIFYKo+iXPFveoyj8SkXcrfq6fg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=EXNgROze4YYRKGJZxbJpOIglfzrjDjQmfA2/oa4gFOw=; b=VeKeadFGO9RaOOGkOCQBnrPXht 4PDET53r5T3VbayY1pdFPWwtFyFJqaK9Zh4GPDu3flhChtm1NdSF4Pd5Ej+S1Z8OwbEoSOw8/E67/ KQLEsBc09y7rh7iaQmEjOjXBpkGdj0KISoWhsvdnYuxCjRh03uP3G6yH62u3oVJBzgyGq08bBjMpK Wef7aQM0/gATbmAQJc4mOJGoMYj3Z/SnZpgacB/7MA14PyqlLQza/bZHRU5RPZCsV2CxYJkKmmfMr k4MpT86rE2k1J6CqoX6LrL197tGK8frgU2DAi/2ymaYqzEsjcu55oPzn4hJAJ+ZG6wuNYm0ubAgfN vpibJ7pw==; Received: from authenticated user by zero.zsh.org with local id 1mLUxf-000GIr-VR; Wed, 01 Sep 2021 18:27:48 +0000 Authentication-Results: zsh.org; iprev=pass (relay8-d.mail.gandi.net) smtp.remote-ip=217.70.183.201; dmarc=none header.from=chazelas.org; arc=none Received: from relay8-d.mail.gandi.net ([217.70.183.201]:38851) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1mLUtS-000EUX-VP; Wed, 01 Sep 2021 18:23:27 +0000 Received: (Authenticated sender: stephane@chazelas.org) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 9EE5F1BF203; Wed, 1 Sep 2021 18:23:25 +0000 (UTC) Date: Wed, 1 Sep 2021 19:23:24 +0100 From: Stephane Chazelas To: Bart Schaefer Cc: Peter Stephenson , Zsh hackers list Subject: Re: bug report: INTERACTIVECOMMENTS option interacts oddly with shell functions in an interactive context Message-ID: <20210901182324.fvsq4je45ne5q5c4@chazelas.org> Mail-Followup-To: Bart Schaefer , Peter Stephenson , Zsh hackers list References: <391FB007-1453-44CF-A990-280C59750F65@twistedmatrix.com> <20210831060354.srascacw2zk35cnm@chazelas.org> <20210901075543.7v2vd4vk47qw4yrr@chazelas.org> <1399787045.1301253.1630509441777@mail2.virginmedia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Seq: 49362 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: 2021-09-01 11:09:33 -0700, Bart Schaefer: > On Wed, Sep 1, 2021 at 8:18 AM Peter Stephenson > wrote: > > > > Yes, that does seem pretty clear. Looks easy to fix and test. > > I'm not sure it's actually all that clear. Consider the original case: > > % alias '#x'='echo The X Factor' > % source =(<<<'echo $( > #x is not a comment > )') > The X Factor is not a comment [...] That's sourcing a script, same as source =(sed '/end/,$d' script) so the stripping of comments should take precendence here IMO. Note that zsh still strips comments in $ cat =(echo foo # comment) foo $ eval 'echo foo # comment' foo I wonder what the original intention was for not honouring comments when run interactively. That doesn't sound useful to me. Was that to mimic csh? I find that much annoying when copy-pasting code at the prompt. It feels wrong to break the shell syntax to accomodate weird use cases. -- Stephane