Why Sponsor Oils? | source | all docs for version 0.22.0 | all versions | oilshell.org
Oils Reference — Chapter OSH Assignment
This chapter describes OSH assignment, which looks like x=value
.
(in progress)
Array literals in shell accept any sequence of words, just like a command does:
ls $mystr "$@" *.py
# Put it in an array
a=(ls $mystr "$@" *.py)
Their type is BashArray.
In YSH, use a list-literal to create a List instance.
Associative arrays map strings to strings:
declare -A assoc=(['k']=v ['k2']=v2)
Their type is BashAssoc.
In YSH, use a dict-literal to create a Dict instance.
Another name for the declare builtin.