From 1c6390fcfac172187beaf82636a642ee65bc9b29 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Thu, 27 Jun 2024 16:56:29 +0200 Subject: [PATCH] ob-doc-shell.org: Document verbatim :cmdline handling * org-contrib/babel/languages/ob-doc-shell.org (Command-line Arguments <>): Document that Org does not escape anything in :cmdline. Reported-by: Max Nikulin Link: https://list.orgmode.org/orgmode/v0ilf6$34l$1@ciao.gmane.io/ --- org-contrib/babel/languages/ob-doc-shell.org | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/org-contrib/babel/languages/ob-doc-shell.org b/org-contrib/babel/languages/ob-doc-shell.org index 76b9d136..fd20ee36 100644 --- a/org-contrib/babel/languages/ob-doc-shell.org +++ b/org-contrib/babel/languages/ob-doc-shell.org @@ -553,6 +553,18 @@ of whether a =:session= is declared. =:cmdline ... [arg_n]= Use the =:cmdline= header arg to pass arguments to a shell command. +The arguments are passed verbatim as +: -c + +#+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, -- 2.45.2