Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
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.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
	autolearn=ham autolearn_force=no version=3.4.1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;
        h=from:message-id:date:in-reply-to:comments:references:to:subject
         :mime-version:content-type;
        bh=A/EXn4o60G8jhZEfllNaofYyYMztqC2fgozCLStfn3M=;
        b=J++zTTbPQp0Oa2CCf/j1lD2CLzIJEIG4eRzHiMcUKPZMrtRtvfXm0E5rj977Jg6mtN
         lXWc5qImszjJXOXwgdb12krs7t90++VlmwMoJGd6qKSMNWg7rPtyv5Rgk7jFxIgu2l33
         b0mlmB5aIjmoni9EsQRD4Q+o1JNngjtCOxKecykOBWz2AXsmV71plEqPHF5FvZO87A87
         rIJtRe29tZJfl2LBYd16nDF/DTfrv61QM3k5CPfAnbbmwlDIZDc1bU5d+Wa2hpTorN9P
         ysNJ/XChh9Wxt0Yl0ag0rNtjhFWD/Ibv76+262K0s8j7wW4KymgZ6hhqk3qAgn8b0ab8
         BVOw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:message-id:date:in-reply-to:comments
         :references:to:subject:mime-version:content-type;
        bh=A/EXn4o60G8jhZEfllNaofYyYMztqC2fgozCLStfn3M=;
        b=B0JI4uEUnQctQf088kIrnaHT8ImimdofGP1pn9DKGxcASRDxperpKa+REsQEsJV2ZB
         dMtzffTjgpC+1hF8FtZXiUqx2hKVNhTMEhk31UCEa8e7092o5HQ3Yv4cY7bWaRIf9adJ
         oFh0h/c0qOHJB7e9oY6J2OKeF85VbPUIx9a/rV4AdtLwgvKZBvQyHTYZKwBhp7eyKTK4
         XcGmcS7u71il0PDfFiINh9rtPDMR2gl4eVt9q5Dv2tdlNOgQ4GvkitUeQ0064JUHuhjn
         XNWt9ISGDbB8Te2SCeBIeRS0SOhXdCt1yLsYzHZMEtRp4E1Ktuc2xY6gH2eEC0jEWtWY
         3nww==
X-Gm-Message-State: AG10YOQxiKED9NJJnsNiB74RM1W1ENp288V67JhfFS7IVm/KsyJPN5pclJ3t1pg5L910lw==
X-Received: by 10.66.234.226 with SMTP id uh2mr61279308pac.20.1455139238840;
        Wed, 10 Feb 2016 13:20:38 -0800 (PST)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160210132048.ZM3836@torch.brasslantern.com>
Date: Wed, 10 Feb 2016 13:20:48 -0800
In-Reply-To: <20160210164150.5bef82b2@pwslap01u.europe.root.pri>
Comments: In reply to Peter Stephenson <p.stephenson@samsung.com>
        "PATCH: rm * with count" (Feb 10,  4:41pm)
References: <20160210164150.5bef82b2@pwslap01u.europe.root.pri>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: "Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: PATCH: rm * with count
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 37943

On Feb 10,  4:41pm, Peter Stephenson wrote:
} Subject: PATCH: rm * with count
}
} Faced with a "rm *" prompt, it occurred to me it might be a little bit
} more helpful to decide if something has gone really horribly wrong if we
} made the easy tweak to count the number of files in the directory.
} 
} Any comments on the following?

My only comment would be that this can potentially take a long time if
the number of files in the directory is large.  Perhaps stop after some
number (100?) and prompt with

    "sure you want to delete more than %d files in "

Also if the count is zero maybe the prompt should say something about
"no files to remove" or something.

