Changes by: Aleksey Nogin (nogin at metaprl.org)
Date: 2007-04-27 15:38:04 -0700 (Fri, 27 Apr 2007)
Revision: 10542
Log message:
A follow-up to Rev. 10487 ("#! lines):
- Only react to "#!" lines in the beginning of a file (for compatibility with
standard shell processing), consider them comments when they happen in the
middle
- Fixed a bug with "#!osh" complaining "unknown option: osh" (the "#!"
processing failed to skip the first element of the argv)
- Ignore any unknown options or other argv parsing errors in the "#!" lines.
This is needed because the internal "#!" processing currently only has
access to a subset of the options that are available on the command line
(for example, the debugging flags are only available on the command line).
Unfortunately, the only way to do this within the current Lm_arg setup is
to ignore _all_ options when there is an unknown one...