1 | |
2 | shopt -s oil-parse-at static-word-eval |
3 | |
4 | myglobal=global |
5 | |
6 | var myarray = :| $myglobal $'line\n' ${z:-default} | |
7 | spec/bin/argv.py @myarray |
8 | echo len=$[len(myarray)] |
9 | echo |
10 | |
11 | append _ '1 2' ${myglobal:-default} (myarray) |
12 | spec/bin/argv.py @myarray |
13 | echo len=$[len(myarray)] |
14 | echo |
15 | |
16 | for item in (myarray) { |
17 | echo " $item" |
18 | } |
19 | |
20 | # NOTE: This doesn't work for arrays |
21 | #setvar myarray += %(more stuff) |