Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2006-03-15 19:51:16 -0800 (Wed, 15 Mar 2006)
Revision: 8897
Log message:
This completes the initial version of strict
command-line quoting. The main property here is that
atomic values and array elements are preserved on the
command line. The only things that can be split are
normal strings.
Non-compatible changes:
- globbing and shell tokens are only allowed in
normal strings. All other values are quoted.
osh> X[] = echo * > /dev/null
osh> $X
* > /dev/null
osh> Y = echo * > /dev/null
$Y
osh>
TODO:
- add an "unquote" function, so for example
the following would echo the * into /dev/null
osh> $(unquote $(X))
- Review the code for performance.
- Decide whether strings should be quoted
eagerly. Probably not, because we have such
things like this, where we have expected the
quotes to be included in the file.
println(foo.txt, "Hello world")
- Do the related changes to rule targets/sources
in the same way (including implicit rules).