Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
noglob does not call alias?
- X-seq: zsh-users 18598
- From: Amm <ammdispose-zsh@xxxxxxxxx>
- To: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: noglob does not call alias?
- Date: Thu, 13 Mar 2014 16:52:30 +0800 (SGT)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1394700750; bh=RckHZ/0X817X60PLS3+/TeU+bGuviTK1lWeXacz2RzE=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=e9XR6zSbJh+q/6fxDlhMWpEhh/VaDS39d02sXrloWpKUXA9oTC6vxAcgw88JPGgW4CpGEfQgP+ur+u777aXMSot7WUZ75/y0B41Qi5w3GS2mMcouQqlCJeBqUeeQ2tYCJATz7gPQAhA7rEcRhw/x5skIClpBZvsreoTHSN9nWW4=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=L6b96h0lj5QLM9YbkHIObQ1QDV32co5uvT2TrejvznRQHrUrGArepu6fUmKmOIfORUBUtPM2tY22GYo1cJfFra9l8lfbJx8Ezby44CJSSE98aYPbX/k3NDofpAonWCe7ulpiO0ikAiLTZ5y1eoiZlyo0zpZEK2o3VkvUSmkMRa0=;
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Reply-to: Amm <ammdispose-zsh@xxxxxxxxx>
Hello,
So I was just trying this.
$ alias rm='nocorrect rm -i'
$ touch 1 2
$ ls
1 2
$ rm 1
rm: remove regular empty file `1'? n
$ noglob rm 1
$ ls
2
Shock!! File deleted without asking for confirmation?!
I think this is not what (new zsh) user expects.
How do I prevent this?
Also 'noglob' does not respect RM_STAR_SILENT=off.
$ unsetopt RM_STAR_SILENT
$ rm *
zsh: sure you want to delete all the files in ... [yn]? n
rm: missing operand
Try `rm --help' for more information.
First I think when I said 'n'(no), it should not call
'rm' at all instead of calling it without any filename.
But, anyway, continuing with my e-mail:
$ noglob rm *
rm: cannot remove `*': No such file or directory
This caused no harm here but I would still prefer that
it should ask if I am sure to delete all the files.
(Purpose here is to warn user of scary error!)
So any idea?
Thanks in advance,
Amm
Messages sorted by:
Reverse Date,
Date,
Thread,
Author