zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <danielsh@apache.org>
To: zsh-workers@zsh.org
Cc: 875460-forwarded@bugs.debian.org,
	"Maxime “pep” Buquet" <pep@collabora.com>
Subject: Re: zsh: RM_STAR warning counts files as though DOT_GLOB is set
Date: Mon, 11 Sep 2017 15:19:15 +0000	[thread overview]
Message-ID: <1505143155.3891161.1102263072.1D722C8A@webmail.messagingengine.com> (raw)
In-Reply-To: <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


       reply	other threads:[~2017-09-11 15:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170911143436.GB1960@caska>
     [not found] ` <20170911150740.pz7fudj5lsflrmtk@tarpaulin.shahaf.local2>
2017-09-11 15:19   ` Daniel Shahaf [this message]
2017-09-11 15:23     ` Peter Stephenson
2017-09-11 15:31       ` Bart Schaefer
2017-09-11 15:41         ` Daniel Shahaf
2017-09-15  5:35           ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1505143155.3891161.1102263072.1D722C8A@webmail.messagingengine.com \
    --to=danielsh@apache.org \
    --cc=875460-forwarded@bugs.debian.org \
    --cc=pep@collabora.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).