|
From: | Max Nikulin |
Subject: | Re: [BUG] ob-shell: :cmdline fails with single argument (was Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline) |
Date: | Sun, 19 Nov 2023 13:57:26 +0700 |
User-agent: | Mozilla Thunderbird |
On 19/11/2023 01:20, Matt wrote:
#+begin_src bash :cmdline 1 echo "$1" #+end_src Then it fails with list: Wrong type argument: sequencep, 1
I would say that :cmdline is treated in a different way in comparison to :var:
#+header: :results verbatim #+begin_src bash :var arr='(1 2 3) :cmdline '(97 98 99) printf '$1:%s\n' "$1" declare -p arr #+end_src #+RESULTS: : $1:abc : declare -a arr=([0]="1" [1]="2" [2]="3")I would expect more consistent results since script arguments is an array (positional arguments). $1=97, $2=98, $3=99
[Prev in Thread] | Current Thread | [Next in Thread] |