Quoth Greg Reagle: 
> > * Quote "$edit" in case the editor has a space in its name.
> 
> I deliberately do not quote $edit so that I can set EDITOR to nano -w. 
> Is that non-standard/wacky?  Is there a convention for whether the the
> value of EDITOR environment variable should be able to have options?

Any system that has an EDITOR which includes spaces isn't worth 
supporting. Doubly so because you have a reasonable use-case that 
makes quoting it the wrong thing to do. Bourne shell scripts will 
always have to make certain trade-offs between portability and 
readability. You could make the script massive and try (and fail) to 
cover every eventuality, and it would get more and more horrible and 
fail in more and more subtle ways. Supporting diverse stupid systems 
is what made the GNU code as crazy as it is (arguably that helped it 
gain dominance back when there were so many different and 
incompatible unix systems, happily that's no longer the case today).

Reply via email to