I recently read
http://www.defensecode.com/public/DefenseCode_Unix_WildCards_Gone_Wild.txt

and although I was not unaware of these possibilities, the reminder was 
nonetheless uncomfortable.

It occurred to me that most abuses of wildcards with filenames that a command 
might interpret as something other than a filename can be prevented by 
preceding any wildcard that starts with a metacharacter with "./".

It is not impossible to train oneself to type "./*" instead of "*"...but it's 
not particularly easy, either.

It then occurred to me that it would be great to have a shell option something 
like

set -o saferexpand

which would do just that: precede any results of the expansion of a wildcard 
whose first character was a metacharacter with "./".

For compatibility, it should be an option; and for the immediate future, not 
the default.

Has this already been considered and rejected for reasons of which I'm unaware, 
or does it sound reasonable to others?


_______________________________________________
ast-users mailing list
ast-users@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to