Waldek Hebisch <[EMAIL PROTECTED]> writes:

| Gabriel Dos Reis wrote:
| > This patchlet works for me.  Could you test it?
| > 
| > *** document.in (revision 15247)
| > --- document.in (local)
| > *************** while test $# -gt 0 ; do
| > *** 129,136 ****
| >   
| >         --tangle)
| >            do_tangle=yes
| > !          if test -n $arg; then
| > !              chunk=$arg
| >            fi
| >            # --tangle may not be combined with any other
| >            # options.  FIXME:  Check that. 
| > --- 129,136 ----
| >   
| >         --tangle)
| >            do_tangle=yes
| > !          if test -n "$arg"; then
| > !              chunk=`echo -n $arg`
| >            fi
| >            # --tangle may not be combined with any other
| >            # options.  FIXME:  Check that. 
| > 
| 
| Works for me. 

Thanks.

| But I still do not understand this:
| 
|        chunk=`echo -n $arg`
| 
| thing (despite later messages). 

It is trying to turn $arg that might be splitted into many strings
(because of over quoting -- despite the popular belief that quoting
should be done systematically) into a single string so that is has
only one quote at the beginning and one quote at the end.

| Using bash I can just put
| 
|        chunk=$arg
| 
| and it works (the problem was on test line).  Zsh manual claims
| that word splitting is not done on assignment (and I think
| same is true for bash).

That behaviour is controlled by options, so the simpler asssignment
which should work is brittle.  You can remove the echo, but PLEASE
don't quote $arg in the assinment.

-- Gaby


_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to