On 24/04/2024 19:52, Ihor Radchenko wrote:
Max Nikulin writes:
I believe, multiple arguments should be specified as '(1 a "b c").
Yes, but we do not, in general, know how to split them.
Something should be changed anyway since current behavior is
inconsistent and so is buggy.
The only difference of script arguments from :var is that just a string
should be converted to a list having single value. It should be possible
to specify list of script argument as a reference to a named element
similar to
#+name: shvar
#+header: :var a='(1 abc "def ghi") :results verbatim
#+begin_src bash
printf '%s\n' "${a[@]}"
#+end_src
#+name: varval
- 1
- bcd
- list items
#+call: shvar(a=varval)
With shebang (as header arg or as part of the body) command should be
/path/to/script [ARGUMENT]...
when there is no shebang
/shell/executable /path/to/script [ARGUMENT]...
Maybe instead of `process-file' we can simply use `shell-command'?
Doesn't `shell-command` call `process-file` with `shell-file-name` and
`shell-command-switch' under the hood like in your patch?