~bzg/worg

1c6390fcfac172187beaf82636a642ee65bc9b29 — Ihor Radchenko 15 days ago aa88a50
ob-doc-shell.org: Document verbatim :cmdline handling

* org-contrib/babel/languages/ob-doc-shell.org (Command-line Arguments
<<cmdline>>): Document that Org does not escape anything in :cmdline.

Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://list.orgmode.org/orgmode/v0ilf6$34l$1@ciao.gmane.io/
1 files changed, 12 insertions(+), 0 deletions(-)

M org-contrib/babel/languages/ob-doc-shell.org
M org-contrib/babel/languages/ob-doc-shell.org => org-contrib/babel/languages/ob-doc-shell.org +12 -0
@@ 553,6 553,18 @@ of whether a =:session= is declared.
=:cmdline <arg_1> ... [arg_n]=

Use the =:cmdline= header arg to pass arguments to a shell command.
The arguments are passed verbatim as
: <system shell> -c <temporary file with src block contents> <arguments>

#+begin_warningbox
=:cmdline= is used verbatim and is interpreted by shell.  Org mode
does not prevent shell expansion/interpretation.  This, for example,
means that
: #+begin_src sh :cmdline arg ; touch /tmp/not-an-arg
: ...
: #+end_src
will evaluate =touch= command as well.
#+end_warningbox

#+begin_warningbox
When =:cmdline= is used, the block is evaluated in a temporary shell,