Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

noglob does not call alias?



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