Re: [BUG] ob-shell: internal representation of cmdline arguments the same

2024-05-01 Thread Ihor Radchenko
Max Nikulin writes: > I consider it as a kind of pitfall inconsistent with DWIM concept. An > idea of a kludge is below. > > #+begin_src sh :cmdline "1 2 3" :results verbatim >printf '%s\n' "$@" > #+end_src > ... > - (read cell)) > + (propertize (read cell) 'org-babel-value '

Re: [BUG] ob-shell: internal representation of cmdline arguments the same

2024-05-01 Thread Max Nikulin
On 29/04/2024 19:22, Ihor Radchenko wrote: Matt writes: #+begin_src bash :cmdline "1 2 3" [...] To force quotes in the :cmdline one can do #+begin_src bash :cmdline "\"1 2 3\"" echo "$1" #+end_src I consider it as a kind of pitfall inconsistent with DWIM concept. An idea of a kludge is be

Re: [BUG] ob-shell: internal representation of cmdline arguments the same

2024-04-29 Thread Ihor Radchenko
Matt writes: > #+begin_src bash :cmdline 1 2 3 > ... > #+begin_src bash :cmdline "1 2 3" > ... > It was stated that, > > #+begin_quote > AFAICT, it's due to how headers are parsed by > 'org-babel-parse-header-arguments' using 'org-babel-read'. The cell "\"1 2 > 3\"" (corresponding to :cmdline

[BUG] ob-shell: internal representation of cmdline arguments the same

2024-04-28 Thread Matt
While investigating "[BUG] ob-shell: :shebang changes interpretation of :cmdline" (https://list.orgmode.org/orgmode/18f01342a2f.124ad27612732529.8693431365849276...@excalamus.com/), it was observed that :cmdline 1 2 3 behaves like :cmdline "1 2 3" The first argument is the first space delimited