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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23216 invoked from network); 13 Mar 2021 13:41:30 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Mar 2021 13:41:30 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1615642890; b=j5rxLOMDEiePLXM3jGL5qL4eT0P+C3scuMjVKq8PcJ6Ax6Qs5bBo3xxrMMgdEdnDr/ipi+49nK ipSpIgJFF3dJvLq0WxDPP/voV8j9MbiSfi6ZcdEpuDPHVd9qZFZCxrY65rRtY5/4GcUkjxgwnX W5EQQrC25KFMy0GaKa3pidHxxl1RuCuUj8jImNvrnJkSQMkXMAHJ0OXilRiKPJVRbVPEohJTu0 l5ywgsLQ7AK7A+k0fDhqrDgB5BZJbd+95H6lFM4ostbpdJ5ynm/wKvDpKrfWYao5FF/s3u+7Cx jCAsdLMApHxv+CzzmfGgcpH3VwVDrLpY0gI3rvZKVrMFIw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (wout1-smtp.messagingengine.com) smtp.remote-ip=64.147.123.24; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1615642890; bh=Q1v0DwQpnNEXI/59cT7vsafRdAx9hgIcBM211YJ/Sus=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Subject:Cc:To:From: Date:References:In-Reply-To:Message-ID:MIME-Version:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=d9Bltndzxvn0z4pWspDl7vwgsExqdaHuPptmsachSOM8OvXQBoK1rfyhXADgssKp3rGS4rI+Nr RoD/eiYQmizN71Wj1T6kk1+6tyfDSD2xMerR5ue6lWNYdqh2ynt8xvXrhWvfdRYlPJfS7+TXMV rfT91tiA2jJcs+iBZEeOgItoYA/5IoJWAzlB3tYj6Lq7iH7LgttMDxkNnhU36pYtvgARwBbCTJ xR8DLJNxQc06ZhXZyg4QGXJl0B93Q6GDgvMp6ePuW+qz000onf9JtcO/g1gZIMHqmjO7Pf6P9f UaeEK7iJVDhJ2x88nl6K7FjMBWKEC/B77/DXPPeAVZ6FAg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Subject:Cc:To:From:Date:References:In-Reply-To:Message-Id: Mime-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=5lf/X5EUgma1DxnbFcJ67Hieb1UdJAHZGgoH2dt/U+4=; b=DD0rmxDy8oC54ArUpcir4dILmz qu9tdRwbFs7ZJXgsa0SQ9gN/aZ13T2PgH1Mk91TGtkCTSgdUSi/POfE770uAu2NNKoUAvjftuy02V XwzaphPNmEeLr8llJrZ0NvYTGEDM/B/f8GLa44CgYi4jnuD9b7UaLI4BqPHRkKVfkLvPEzOVbLIeu gY2qoSH/MwezsR2WVecQ/ZvOwNKIetrZQfk/OL27Y5fN2LHFHoFozkk1Ceun1H8ePrbzuDgibGjOf ne6feMCQBQ3XTr0SKVE/UXUELbB6l+B/vydwpX6R7f2jCKkcfaglAsG/RJjSsXOV6Gh8ihfAdvnuW xGHmUwTQ==; Received: from authenticated user by zero.zsh.org with local id 1lL4WH-000CjM-2b; Sat, 13 Mar 2021 13:41:29 +0000 Authentication-Results: zsh.org; iprev=pass (wout1-smtp.messagingengine.com) smtp.remote-ip=64.147.123.24; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:56401) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lL4Vz-000CZj-UR; Sat, 13 Mar 2021 13:41:14 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 2729D129C; Sat, 13 Mar 2021 08:41:09 -0500 (EST) Received: from imap37 ([10.202.2.87]) by compute3.internal (MEProxy); Sat, 13 Mar 2021 08:41:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=mime-version:message-id:in-reply-to :references:date:from:to:cc:subject:content-type :content-transfer-encoding; s=fm2; bh=5lf/X5EUgma1DxnbFcJ67Hieb1 UdJAHZGgoH2dt/U+4=; b=E1nxe0NpwgjKCfNoc11ICp+GsQb2L//srqeWudQkR0 qOrR9QMrVTS1JnBdG8YqPmo9P69VaHXuhlX/1iSZhUnJ7VYsMUA59RuEork64OhO Z71cujWWH6VSmldtukvXi2Konu99cZKiECLtcpMgeOU+dXoXkIhz+i7LIlfZ8i9M ZSD9Rc3KaVypm12Kab7nS8ZjZUuRaYsAMOE1E60HZV4wsIjxbXLVk2mt/76V4vis VEbmug6oRSgrlIBzMXXtzEsX4DPE/83x3RcTf87URZWRFeibX4tAhO3QRFM3pnXx tofJq18cim+UQj3p937gNl7Nv2kxy4v6tgArWIShQGLA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=5lf/X5EUgma1DxnbFcJ67Hieb1UdJAHZGgoH2dt/U +4=; b=biSwEY3bpXKS9F2MwtKWp1qqERCUpFglWpmmK2SKEZ6c85A+hGBe8OVB+ cAUnQ/3Kv18JhxF2dUfA2j5P5MYwJbTcrbFR+F3vV8c9IRNix0Ia56yUD4xEokrG mj2qnNAjn6qWF1qMQ6UBtIon3asD4xG2+iAUwovcgeLI/7pIRIRfTxL6eemhcoRs OhMSSDJ1dpYKovNLxiq8cyqI4UVaDQmO4mleT8PzwRicIcytjfFPPxa75TFPhV85 4hwyYetJPSAKz/1hTWW7T+R7e9oQZNXB1WFrH+NHSfx/AtUOTe2iO+NLi2lmZ63Y 4k9u3ESiaP9GiGmAKYJR3MvCE+jVw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddvgedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfffgr nhhivghlucfuhhgrhhgrfhdfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmh gvqeenucggtffrrghtthgvrhhnpeefhfekfeevieelleehiefftdekudejledvhfdtjedt geegvdeuffefleehhfdvgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id B04FF6B40061; Sat, 13 Mar 2021 08:41:07 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-206-g078a48fda5-fm-20210226.001-g078a48fd Mime-Version: 1.0 Message-Id: <8dcedcce-b95c-4097-a379-f0777d708f72@www.fastmail.com> In-Reply-To: <884654866.425858.1615560127191@mail2.virginmedia.com> References: <20210304201721.GA16874@tarpaulin.shahaf.local2> <20210307172246.GB9936@tarpaulin.shahaf.local2> <1084110603.423549.1615556176994@mail2.virginmedia.com> <884654866.425858.1615560127191@mail2.virginmedia.com> Date: Sat, 13 Mar 2021 13:40:37 +0000 From: "Daniel Shahaf" To: "Peter Stephenson" Cc: zsh-workers@zsh.org Subject: =?UTF-8?Q?Re:_Bug_+_patch:_`zstyle_':completion:*'_menu_select=3Dlong-li?= =?UTF-8?Q?st`_fails_to_start_menu_selection?= Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 48176 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: Archived-At: Replying on-list with permission and fullquote. Peter Stephenson wrote on Fri, 12 Mar 2021 14:42 +00:00: > > On 12 March 2021 at 14:14 Daniel Shahaf wro= te: > > Peter Stephenson wrote on Fri, 12 Mar 2021 13:36 +00:00: > > >=20 > > > > On 12 March 2021 at 13:11 Marlon Richert wrote: > > > >=20 > > > >=20 > > > > I found the culprit: I had > > > >=20 > > > > export GREP_OPTIONS=3D'--color=3Dalways' > > > >=20 > > > > in my `.zshrc` file and that mangled the .mdd file names. > > >=20 > > > It's probably worth having the following. It doesn't cover all th= e > > > possible cases where you can get into trouble, but it's a useful > > > blanket for the standard case where everything is done immediately= > > > from configure. > > >=20 > >=20 > > I'm not sure I agree. > >=20 > > - This seems to be a cases of "hard cases make bad law". Setting > > --color=3Dalways in the environment will break any script that exp= ects > > grep(1)'s standard semantics, not just configure. The patch just > > papers over the problem. > >=20 > > - We shouldn't second-guess the user. If the user has GREP_OPTIONS = set > > in the environment, that might actually be needed in order to have= > > grep(1) behave correctly. What if some system uses GREP_OPTIONS t= o > > make its grep(1) tool behave POSIX compatibly? >=20 > I think that's missing the point of the patch, which is that for anyon= e > setting up zsh, configure should just run in a sandbox with whatever i= s > going on outside irrelevant to it; It is an API promise of autoconf that AC_PROG_GREP will use the environment variable $GREP to find a grep program. I would therefore expect =C2=ABGREP=3D/bin/foo GREP_OPTIONS=3Dbar ./conf= igure=C2=BB to also be supported, even for values of foo other than GNU grep. > it's an implementation detail that it's a shell script at all. Well, yes, configure could be implemented in Rust for all anyone cares, but it would still have to obey that API promise about the "GREP" environment variable. > GREP_OPTIONS is a user extension, there's no > question of it being needed for POSIX --- GNU do things this way exact= ly so > that if you have a vanilla environment it is basically (but not necess= arily > completely, as this is a complicated area) POSIXy. >=20 In GNU's case, yes, but non-GNU implementations of grep may also use envvars named GREP_OPTIONS, and your patch could easily break those. Even with GNU grep, I could imagine someone setting GREP_OPTIONS=3D--exclude=3D'.git', and then a configure script using =C2= =ABgrep -R=C2=BB if $GREP happened to be GNU grep. (even if zsh's configure script doesn= 't do that) Also, someone might run =C2=ABCC=3D/my/wrapper ./configure=C2=BB where /= my/wrapper is a shell script that uses grep and relies on GREP_OPTIONS being set. > If you do feel the need to pursue a more complicated path, however, yo= u're > welcome to do so and I'll keep out of the way. >=20 Let's take a step back, please. You proposed a change. I don't think that change is a good one to make. For instance, consider that if the patch is a good change, it would need to be applied to every single configure script out there; actually, to _every single portable script_ that uses grep. I view the issue as a bug in Marlon's dotfiles; a bug which he has discovered and fixed. The failure mode wasn't ideal, of course, and we could look into improving that; for example, by s/grep/$GREP/ as I suggested and proposing a "look for colour codes in the output" logic to= AC_PROG_GREP. I did propose further alternatives upthread and I welcome feedback and questions on them. And needless to say, I didn't mean to discourage you from participating.= > > - If this fix is needed, we should send it to autoconf upstream to b= e > > incorporated into AC_PROG_GREP. >=20 > That does sound entirely reasonable, if no one's noticed yet. *nod* Cheers, Daniel