zsh-users
 help / color / mirror / code / Atom feed
* noglob does not call alias?
@ 2014-03-13  8:52 Amm
  2014-03-13 11:24 ` ZyX
  0 siblings, 1 reply; 8+ messages in thread
From: Amm @ 2014-03-13  8:52 UTC (permalink / raw)
  To: zsh-users

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-03-13 17:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-13  8:52 noglob does not call alias? Amm
2014-03-13 11:24 ` ZyX
2014-03-13 12:38   ` Christoph (Stucki) von Stuckrad
2014-03-13 13:36     ` ZyX
2014-03-13 14:36     ` Bart Schaefer
2014-03-13 15:17       ` Amm
2014-03-13 17:02         ` Bart Schaefer
2014-03-13 14:48     ` Amm

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).