[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Globbing



Scott Schwartz <schwartz@groucho.cs.psu.edu> writes:
>Saving the last command in the environment is no worse than writing  
it
>to a history file, is it?

Maybe not, but writing a program which depends on this should be  
punishable by death. (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.)

How is your "self-globbing" program going to work when invoked by a  
shell that doesn't know to set this environment variable? 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)?

And this is especially dubious when a far better solution (syntax  
extensibility in es to auto-quote certain parameters) is foreseeable.

-Z-