[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [babel] shell does not unquote
From: |
Eric Schulte |
Subject: |
Re: [O] [babel] shell does not unquote |
Date: |
Sun, 09 Feb 2014 20:18:19 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Samuel Wales <address@hidden> writes:
> hi eric,
>
> the object is to make the code inside a babel shell block as similar
> to a real shell script as possible. also, calling it using #+call
> should be like calling it from another shell script.
>
> this isn't possible in babel at present.
>
> the script cannot use "$@" for its positional parameters. it could
> use <<noweb>>, but that requires the creation of an extraneous block
> merely to do a call, instead of supplying the value in the call line.
>
A couple of languages already support a :cmdline header argument. I've
just added shell block support for :cmdline, so the following is now
possible.
#+begin_src sh :cmdline "foo bar baz"
echo $2
#+end_src
#+RESULTS:
: bar
>
> if making this possible is not desirable, then i will not request it,
> but i wanted to explain why this object is not achieved with existing
> babel options that i am aware of.
>
I hope the above is sufficient, if not I'm not personally able to do
much more on this front, although I'm always happy to review patches.
Best,
>
> thanks.
>
> samuel
--
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D