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 15534 invoked from network); 11 Apr 2020 20:38:08 -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; 11 Apr 2020 20:38:08 -0000 Received: (qmail 10550 invoked by alias); 11 Apr 2020 20:37:57 -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: 45674 Received: (qmail 27485 invoked by uid 1010); 11 Apr 2020 20:37:57 -0000 X-Qmail-Scanner-Diagnostics: from relay1-d.mail.gandi.net 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(217.70.183.193):SA:0(-2.6/5.0):. Processed in 1.836286 secs); 11 Apr 2020 20:37:57 -0000 X-Envelope-From: stephane@chazelas.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _nblcust.gandi.net designates 217.70.183.193 as permitted sender) X-Originating-IP: 94.3.152.49 Date: Sat, 11 Apr 2020 21:37:14 +0100 From: Stephane Chazelas To: zsh-workers@zsh.org Subject: Re: glob qualifier '-' doesn't work correctly on dangling symlinks Message-ID: <20200411203714.wupg6wmd7b7xch2w@chazelas.org> Mail-Followup-To: zsh-workers@zsh.org References: <20200411151511.GA1708902@zira.vinc17.org> <20200411173450.56nnznxtmil5oge3@chazelas.org> <20200411191711.GA1722320@zira.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200411191711.GA1722320@zira.vinc17.org> User-Agent: NeoMutt/20180716 2020-04-11 21:17:11 +0200, Vincent Lefevre: [...] > > That's consistent with GNU find's -xtype l > > But the behavior is not consistent with the stat system call, with > the GNU stat utility (when using the --dereference option), and with > zsh/stat. [...] But ls/stat report information, and find/globs find files. find -xtype l and *(-@) are common, documented idioms. If only for that, I don't think the behaviour should be changed. And it's not clear what the better behaviour would be. If that broken link should not be matched by *(-W), should it be matched by *(-^W)? Why? Or should that fail the glob (cause the shell process to exit)? What about for *(-e:code:)? Here, you can always work around the problem with *(-W^@). IMO, the current behaviour, though not ideal is probably the best you can get (and again, it's consistent with "find"'s). -- Stephane