In message <9402070639.AA19354@mycroft.GreatCircle.COM>, Brent Chapman writes:
> "John P. Rouillard" <email@example.com> writes:
> # Call the following items a-d.
> # > > get ww Mailing List Info
> # > > get ww "Mailing List Info"
> # > > get ww 'Mailing List Info'
> # > > get ww Mailing\ List\ Info
> # 1) set up the parser to replace the string "\ " with
> # \001 before splitting the line. Then replace
> # \001 with a space before passing the arguments
> # to the actual routines. (handles case d)
> # 2) Spiff up the parser to recognize quotation marks, and pars
> # the items inside the quotes into a single item. We would
> # have to be careful about embedded quotes however. (could
> # handle b or c)
> # 3) Punt the entire issue and have a pre_get routine paste the
> # arguments back together with spaces if needed. (could
> # handle a, or b and c if smart enough, or d if we are sure
> # that no word can end with a '\'
> # I would lean to #1 and #3 myself. #2 I think could be implemented
> # using #3 is anybody feels ambitions, but I think some mechanism for
> # embedding spaces into a command is necessary.
> # I have implemented continuation lines by having a \ as the last non
> # whitespace character on the line, so adding another process loop to
> # replace "\ " with a sentinal after collecting the entire line wouldn't
> # be a problem.
> Whatever is done, I'd rather see that section of code done once and
> done "right", rather than hacked on this month for quotes, and 3
> months from now for something different, and 6 months after that for
> something new yet again. That kind of approach is what led me to the
> proliferation of .<flag> files, and I'd like to avoid making the same
> mistake again.
Ok folks lets hear it. What is the "right" way. I think the easiest is
a character based "\ " solution rather than quote based and I am
inclined to believe that the easiest is also the best, but I am open
to persuasion. Unless I see otherwise, I will implemenet the "\ "
escapes I guess.
Special Projects Volunteer University of Massachusetts at Boston
firstname.lastname@example.org (preferred) Boston, MA, (617) 287-6480
My employers don't acknowledge my existence much less my opinions.