[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Globbing
Zalman writes:
| Maybe not, but writing a program which depends on this should be
| punishable by death.
"noglob considered harmful", eh? :-)
| (In case the list hasn't gathered yet, I take a very dim view of
| communicating dynamic data from one program to another via environment
| variables. Too many failure mechanisms otherwise. Env vars should be
| used for more or less long-lived parameters that the user knows about.)
Granted there are problems, but similarly argv is subject to so much
processing that only very limited things can be communicated that way.
| How is your "self-globbing" program going to work when invoked by a
| shell that doesn't know to set this environment variable?
Use argv.
| How is it going to work when exec'ed from another program that was
| exec'ed from es (and hence has a stale value sitting in the faux argv
| environment variable)?
Maybe it would notice that argv[0] didn't match the first token of the
variable. But more likely, it would probably do something horrible. :-)
Anyway, as I said, I'm not really lobbying for this, but just tossing
out ideas to kick around.