From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15266 invoked by alias); 11 Sep 2017 15:31:46 -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: X-Seq: 41674 Received: (qmail 29516 invoked by uid 1010); 11 Sep 2017 15:31:46 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk0-f174.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.220.174):SA:0(-1.4/5.0):. Processed in 1.434587 secs); 11 Sep 2017 15:31:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SORBS_SPAM,SPF_PASS, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=0ggKwvfJrXy/ykIY4LCwMmYPDHhG2N2NZNYaFym/JJ8=; b=D3+c5C2B/gq0topJW/0pTuJzbONgrCrFvgoIXwIca5hUM9ERbXnDpu1P4bNkESLXe2 vy40b5SJyI6B1grhWryVsjPo9DczF7K/vqV871tYUQHPO+alJCe0rcFSMlyav8qFUMFI qP/9BBu5aDFWz3+dF4y1PKW7i0dWxh90XuKxQloHMfpBPI78QXjR9KJgsxE4wV1/b8X+ kM63IuIiq5h42VQqcr3Q+GiWAi1oKMwxjUd6myGjsH8ek+gLb6rNBUPmBZV1zniXYGPF 998lM2wnahUKyiU0bcybcU6sxe+d6V21kXBvtU3wvhHiX1aT72Nb/VhTRQlz/MKEJU6D di1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=0ggKwvfJrXy/ykIY4LCwMmYPDHhG2N2NZNYaFym/JJ8=; b=LB3H63I+kFMof16m8d4akAumnevtZvYQgRbxzPBQmX7ii9xjMw1y8a6qxB+/+IPvZA OScwC8Ba+4b4JW/+ZoFRFekKRe8+Tng+n075OqSfvRgaOwAI9+4+cASVOnGxkAmaFML5 W1jQW3MM8zWm6Cs9FTZW3fjOsQtz365v95JgxHLTcjmIv9BlGI6GLlv7dNCfSTLz7ecp npPmqsnsmMMyGuJWVHzC0s04qjI1DVYuCZadyj2Jaa5J8dUpGuLjbAcVJqEcV5AojpLB +lZS6lxtnOfh0xNII8Ti+JoiO6gIvia8RCfvdlFwfXU1ncIQZXC0Mu2pSR1PFT8oYTNE dJYA== X-Gm-Message-State: AHPjjUhwp3bR7r6kVh+o2YDLxClrdz7JUsPwCWL8z6p8y0q65OMCeR1k YDyZXgkOKBtLE9FnYl6fzBq1gU0qAywY X-Google-Smtp-Source: AOwi7QBdEUn//flRYKsirximgLUCXFNVpvSjjMf1t5cr3RkoeLAevoLm2mYzTR/dKGxM5IVGMlb3Qz+4oPy0jNua9GA= X-Received: by 10.55.154.2 with SMTP id c2mr16470175qke.4.1505143900924; Mon, 11 Sep 2017 08:31:40 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20170911162337.630496ac@pwslap01u.europe.root.pri> References: <20170911143436.GB1960@caska> <20170911150740.pz7fudj5lsflrmtk@tarpaulin.shahaf.local2> <1505143155.3891161.1102263072.1D722C8A@webmail.messagingengine.com> <20170911162337.630496ac@pwslap01u.europe.root.pri> From: Bart Schaefer Date: Mon, 11 Sep 2017 08:31:40 -0700 Message-ID: Subject: Re: zsh: RM_STAR warning counts files as though DOT_GLOB is set To: "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" On Mon, Sep 11, 2017 at 8:23 AM, Peter Stephenson wrote: > On Mon, 11 Sep 2017 15:19:15 +0000 > Daniel Shahaf 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".