zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: zsh: RM_STAR warning counts files as though DOT_GLOB is set
Date: Mon, 11 Sep 2017 08:31:40 -0700	[thread overview]
Message-ID: <CAH+w=7ZLaJ5yzwjhQKoDAfvpt==d7YKCNrBNtueH1e_XRGqZbw@mail.gmail.com> (raw)
In-Reply-To: <20170911162337.630496ac@pwslap01u.europe.root.pri>

On Mon, Sep 11, 2017 at 8:23 AM, Peter Stephenson
<p.stephenson@samsung.com> wrote:
> On Mon, 11 Sep 2017 15:19:15 +0000
> Daniel Shahaf <danielsh@apache.org> wrote:
>> 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?
>
> Apparently, yes.  I think it's just covering the bases.

The issue here, as I recall, is that it's possible to have:
1 "rm *" is issued
2 chkrmall() finds no files in the directory
3 some external process creates a file
4 "rm *" is executed
5 the file created at (3) is silently deleted

So we would need either to avoid re-expanding "*" after chkrmall(), or
treat "found no files" as "user answered no".


  reply	other threads:[~2017-09-11 15:31 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
2017-09-11 15:23     ` Peter Stephenson
2017-09-11 15:31       ` Bart Schaefer [this message]
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='CAH+w=7ZLaJ5yzwjhQKoDAfvpt==d7YKCNrBNtueH1e_XRGqZbw@mail.gmail.com' \
    --to=schaefer@brasslantern.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).