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 18994 invoked from network); 6 Feb 2021 12:32:12 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 6 Feb 2021 12:32:12 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1612614732; b=ILWqlfVzuALbnDJ4KoKY5uwm5pUfb2F7wdWfjBSN0EKj7W9xgRssop94YSKAUe6ZGN77gNNq1y 6Rd8mR8RKRG0J2R+w8gBTgyYfmCT1SAATOJ1FlUdDjYfo+du6I9Cq57nESCr1OE0BUVqgpSkm1 yM3v9WLpWhFEDwvYrjcwmp3K45rP6cfdkyF778lI+FkCYDPlUeFGeg+1/UF8PCstAw6vs6iz+a 5lhEJr/dsN+y1a0DqERniGqLc59IkmPig3cd4FqhE3x5JVewvK5e7g6F4D+/oBNq+T1vmVHBT8 AiEbtnC/qiu6cQcqt+n/Y+tEwiaFSZJ5NVVcjusjF85UCg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out3-smtp.messagingengine.com) smtp.remote-ip=66.111.4.27; 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=1612614732; bh=xvmjf8vTmadD4ONj6uE9F73UIgKQDzi7FnXvu1GYfEY=; 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:DKIM-Signature:DKIM-Signature; b=St2EnyVXb2F88BhAPJ8ZAbIrxRYjvwnVvvCKpv6FOx8ZgaCwoQqAWdfr9qyhLC0Jrbo5cD0FqJ 52KnTb0xcRd7Y1UkLlEZkUnRtMP+SNFNC4p/VyADx28LBy6McoipG79zP3SAqOyyGf5dpSwlTg WTmtAvsrgKlyp8PhCYBO8mjpaHKg1/URntmFFSDy/VBY6aHCGNB6AvKWB9UnfLvZVzr/7JZwRx N0ax2YyEi3tE7cp2SqLhq3UEZlXEqzkCXfzoQ/dbrXBneABwyX5CzOfHhThaXpg52Np601xN6I ALctMrIf6PDCHWSbBO5xaeFLnLvDqlmU6UiNonf6CmWfCA==; 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: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=5BsM0F2Pl04omfxIiI/YsuuUJz+Me54mZlkhoYM2uvw=; b=laE9U3D77Tssps1iMxrVkiqO48 C+RYp9mgXuZs2wOEqPvbfZr/aMbrtLQ2Tn0o6aQ0aT6cZjdsZJBTMGG8ad0CRF3uzfEr1jM0j/v07 TvFTl1KMgCJJ7mqj1krdYwTW74gxlgDFSKVT25MBKKumtWzTdW1UiDkq0iR1R9Ad3B++2eBM3A7kg tK3lC0pyeDptW7aRgV+RrfQT149XFnrGx2yFECvXRDlv79qUH1Dq+qqXoDqwtzk/x9ONl8NQR08aS YIVyp9AbctmkrLz8j8PPOLPizpWFVFilO4huysl6UNTtCYGyMqLsY09+8DLfxbezZh2MTOkDscj0B vyGFoY8w==; Received: from authenticated user by zero.zsh.org with local id 1l8Mkz-0009if-E1; Sat, 06 Feb 2021 12:32:09 +0000 Authentication-Results: zsh.org; iprev=pass (out3-smtp.messagingengine.com) smtp.remote-ip=66.111.4.27; 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 out3-smtp.messagingengine.com ([66.111.4.27]:39893) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1l8Mkd-0009Xh-0j; Sat, 06 Feb 2021 12:31:48 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E81475C003D; Sat, 6 Feb 2021 07:31:45 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 06 Feb 2021 07:31:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=fm2; bh=5Bs M0F2Pl04omfxIiI/YsuuUJz+Me54mZlkhoYM2uvw=; b=HBeeUUHdT7e5AEXMW0C v+71RpkqYbov6JBeL2Erzhf+exDNlmxajRCiuDjUY7J7OkTPeoghZgCyT+iO7qhN aLIQDHMhWOuLOj4yFO/2s8KqgK+ZAUZonD4gUXx+svIjgyUv7HzuD/09SprY4Rah xIZcljPNT069418meZUNUpuJ5cIVj7dBtGu79mB7/mWZvnHfhqSALc2AVNtTm0JV Y49QBNr/Qw2SvBUiyhUxfLaNKWS3hu8vuXuqNrmRdwEbMeFJ0IiG3efjE9ocioKY xSJegqIrFJAfvESgrDF68aek3DJuVZEEaJucoWuRlWvhTmL+7GDRz9IvT4MmZDUG ZFw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=5BsM0F 2Pl04omfxIiI/YsuuUJz+Me54mZlkhoYM2uvw=; b=TgKgVV31icnLrRN8q5l/Xq nn9/44f3HGx8eW+bTtgxLyqX6fMMMuEXFcF74Ev76xPbAfC9klLRRuw1O+1l3bIR MB6eLCj+j2h4G2l6MaCNwMwteeVah+BX2T8AjisHPq76lgYE8lC/qXLDSmHFPXff H9uaQ6XvM/Y0VqQpXC1S9plHa9cjXk1BopvyQOX6MbyUlEZW3JPt7t5FAtboXsml WLFqLzmFAOft4BEaNeqMJJoOpn6WMg59cIbG9UU03Kf0J2gTBuJCqm3N6PWuCI8/ 5MhtkacBuiS0mj/3xPYngjcKtGTgiDwtPUhXfVvxHTaXo2rzlCVtryyu7s3y9T8g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgeekgdegvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujggfsehttddttddtredvnecuhfhrohhmpeffrghnihgv lhcuufhhrghhrghfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenuc ggtffrrghtthgvrhhnpeeuveekfeffueefheefhfegffefvdeitdehtdegleejledviefh veejfeetgedvkeenucfkphepjeelrddujeekrddvkedrieefnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghlrdhshhgr hhgrfhdrnhgrmhgv X-ME-Proxy: Received: from tarpaulin.shahaf.local2 (bzq-79-178-28-63.red.bezeqint.net [79.178.28.63]) by mail.messagingengine.com (Postfix) with ESMTPA id 68A8224005C; Sat, 6 Feb 2021 07:31:45 -0500 (EST) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1005) id 4DXs903ncYz2NP; Sat, 6 Feb 2021 12:31:32 +0000 (UTC) Date: Sat, 6 Feb 2021 12:31:32 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Cc: Devin Hussey Subject: Re: NO_CASE_GLOB and unreadable directories (Episode VI: A New Hope) Message-ID: <20210206123132.GB18168@tarpaulin.shahaf.local2> References: <1009925809.3264416.1611583549597@mail2.virginmedia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 47922 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: Bart Schaefer wrote on Thu, Feb 04, 2021 at 21:53:12 -0800: > It's actually the documentation that gets more complicated, the code > is pretty simple. I rewrote the paragraph I've added to options.yo > about seven times and I'm still not entirely happy with it. Took a stab at it, below. > What I elected was to keep the current behavior by default, and add an > option to get the behavior that termux wants. I named it CASE_PATHS > for reasons I think the documentation paragraph make obvious. Hmm. It may be a bikeshed, but might people guess an option named CASE_PATHS has to do with $PATH? > +++ b/Doc/Zsh/options.yo > @@ -474,6 +474,22 @@ item(tt(CASE_MATCH) )( > +pindex(CASE_PATHS) > +pindex(NO_CASE_PATHS) > +pindex(CASEPATHS) > +pindex(NOCASEPATHS) > +cindex(case-sensitive globbing, option) > +item(tt(CASE_PATHS))( > +If tt(CASE_PATHS) is not set (the default), tt(CASE_GLOB) affects the > +interpretation of em(every) path component, whenever a special > +character appears in em(any) component. When tt(CASE_PATHS) is set, > +file path components that do em(not) contain special filename > +generation characters are always sensitive to case, thus restricting > +tt(NO_CASE_GLOB) to components that contain globbing characters. > + > +Note that if the filesystem itself is not sensitive to case, then > +tt(CASE_PATHS) has no effect. diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo index b3bf11f5c..4aca04746 100644 --- a/Doc/Zsh/options.yo +++ b/Doc/Zsh/options.yo @@ -463,6 +463,12 @@ the presence of any character which is special to filename generation will cause case-insensitive matching. For example, tt(cvs+LPAR()/+RPAR()) can match the directory tt(CVS) owing to the presence of the globbing flag (unless the option tt(BARE_GLOB_QUAL) is unset). + +The case-insensitive matching is affected by the tt(CASE_PATHS) option, +which see. + +Note that if the filesystem itself is not sensitive to case, then +this option has no effect. ) pindex(CASE_MATCH) pindex(NO_CASE_MATCH) @@ -474,6 +480,23 @@ item(tt(CASE_MATCH) )( Make regular expressions using the tt(zsh/regex) module (including matches with tt(=~)) sensitive to case. ) +pindex(CASE_PATHS) +pindex(NO_CASE_PATHS) +pindex(CASEPATHS) +pindex(NOCASEPATHS) +cindex(case-sensitive globbing, option) +item(tt(CASE_PATHS))( +This option only has an effect when the tt(CASE_GLOB) option is unset, which is +not the default. + +This option governs the case-insensitive matching used when the tt(CASE_GLOB) +option is unset. When this option is unset (the default), whenever a special +character appears in em(any) path component, em(all) components will be +interpreted case-insensitively. When this option is set, +file path components that do em(not) contain special filename +generation characters are always sensitive to case, thus restricting +tt(NO_CASE_GLOB) to components that contain globbing characters. +) pindex(CSH_NULL_GLOB) pindex(NO_CSH_NULL_GLOB) pindex(CSHNULLGLOB)