From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 19562 invoked from network); 12 Apr 2020 01:22:48 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with UTF8ESMTPZ; 12 Apr 2020 01:22:48 -0000 Received: (qmail 25101 invoked by alias); 12 Apr 2020 01:22: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: List-Unsubscribe: X-Seq: 45677 Received: (qmail 15438 invoked by uid 1010); 12 Apr 2020 01:22:39 -0000 X-Qmail-Scanner-Diagnostics: from wout5-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25772. spamassassin: 3.4.4. Clear:RC:0(64.147.123.21):SA:0(-2.6/5.0):. Processed in 3.772076 secs); 12 Apr 2020 01:22:39 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrvdehgdegfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfgjfhfogggtgfesthhqtd dtredtjeenucfhrhhomhepffgrnhhivghlucfuhhgrhhgrfhcuoegurdhssegurghnihgv lhdrshhhrghhrghfrdhnrghmvgeqnecukfhppeejledrudejjedruddugedrudegleenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegu rghnihgvlhdrshhhrghhrghfrdhnrghmvg X-ME-Proxy: Date: Sun, 12 Apr 2020 01:21:55 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Re: glob qualifier '-' doesn't work correctly on dangling symlinks Message-ID: <20200412012155.7954a35f@tarpaulin.shahaf.local2> In-Reply-To: <20200411234817.GA1737986@zira.vinc17.org> References: <20200411151511.GA1708902@zira.vinc17.org> <20200411173450.56nnznxtmil5oge3@chazelas.org> <20200411191711.GA1722320@zira.vinc17.org> <20200411203714.wupg6wmd7b7xch2w@chazelas.org> <20200411234817.GA1737986@zira.vinc17.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Vincent Lefevre wrote on Sun, 12 Apr 2020 01:48 +0200: > On 2020-04-11 21:37:14 +0100, Stephane Chazelas wrote: > > find -xtype l and *(-@) are common, documented idioms. If only > > for that, I don't think the behaviour should be changed. > >=20 > > And it's not clear what the better behaviour would be. > >=20 > > If that broken link should not be matched by *(-W), should it be > > matched by *(-^W)? Why? =20 >=20 > No, just like file0(^W) gives "zsh: no match" (as file0 does not exist). >=20 > > Or should that fail the glob (cause the shell process to exit)? =20 >=20 > The shell process should not exit (except with "set -e"). > The behavior should be: replace the link by the target, then > apply the glob qualifiers. >=20 To be explicit, then, the proposal is that =C2=ABbrokensymlink(-W)=C2=BB and =C2=ABbrokensymlink(-^W)=C2=BB should both trigger the "no match" error? (= I.e., the target of a broken symlink is neither writable nor not writable.) What should =C2=ABbrokensymlink(-)=C2=BB do? What would be the glob qualifier syntax for broken symlinks? Cheers, Daniel (ENOTIME, so not expressing an opinion and not diving into the various points being made; just wanted to clarify a few points.)