Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh: RM_STAR warning counts files as though DOT_GLOB is set
- X-seq: zsh-workers 41672
- From: Daniel Shahaf <danielsh@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: zsh: RM_STAR warning counts files as though DOT_GLOB is set
- Date: Mon, 11 Sep 2017 15:19:15 +0000
- Cc: 875460-forwarded@xxxxxxxxxxxxxxx, Maxime “pep” Buquet <pep@xxxxxxxxxxxxx>
- 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-sender:x-me-sender:x-sasl-enc; s=fm1; bh=4LFMmN rlc9vptKA8wLZ6DtVqb3caUBswRRbH7QNQg1c=; b=O1YQuUbYfGnWz25d6jvbzR FNnLX/W8In19zVXBt4dDxma8wQ4Y3uQnZgM9hEI8QFfqetr40Kz68/RTuuHyPowv OkNwwg1br3kegVr37DKwg+2Bje32eTzFjArYd0aiOXBovRYw9VRwgCM2ZHm0WYMh CVzvgQTI2TufAvEou8Sk21+66Cs1u9gZ9NbYJV3D87hluYkP+hKwT3QnMtOMz+DR oFwyizemPMnlCjcakJ1J00PxHbkakOZ2WbxD0jRLyVi1UN/dlX1Z5lHdRH4a8Gkz W+M8db/zOCrprHBehoPjydAplRqBD7tVL5taCDrr9+bPdsL4hvS0ZNqvilLER1LQ ==
- In-reply-to: <20170911150740.pz7fudj5lsflrmtk@tarpaulin.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20170911143436.GB1960@caska> <20170911150740.pz7fudj5lsflrmtk@tarpaulin.shahaf.local2>
Forwarding from Debian:
Daniel Shahaf wrote on Mon, 11 Sep 2017 15:07 +0000:
> $ zsh -f
> % cd $(mktemp -d)
> % touch ./foo ./.bar
> % rm *
> zsh: sure you want to delete all 2 files in /tmp/tmp.65xnqgzMAY [yn]? y
> %
> % ls -A
> .bar
> % echo $ZSH_PATCHLEVEL
> zsh-5.4.2-1-gab6ac7313
The problem is that it says "2 files" but only one file is deleted.
The impedance mismatch is that checkrmall() calls zreaddir(...,
unset(GLOBDOTS)), but the second actual argument to zreaddir() governs
whether the dot and dot-dot entries would be excluded. Instead,
checkrmall() should pass true for the second argument of zreaddir(),
and dotfiles should be ignored by some other means when ignoredots is true.
(I've just added a docstring to zreaddir() to close the barn door.)
I don't understand the last branch of the if/else in that function: it seems to
prompt "... delete all the files ..." when count == 0?
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author