| 1 | ---
|
| 2 | in_progress: yes
|
| 3 | body_css_class: width40 help-body
|
| 4 | default_highlighter: oils-sh
|
| 5 | preserve_anchor_case: yes
|
| 6 | ---
|
| 7 |
|
| 8 | OSH Assignment
|
| 9 | ===
|
| 10 |
|
| 11 | This chapter in the [Oils Reference](index.html) describes OSH assignment.
|
| 12 |
|
| 13 | <div id="toc">
|
| 14 | </div>
|
| 15 |
|
| 16 | ## Operators
|
| 17 |
|
| 18 | ### sh-assign
|
| 19 |
|
| 20 | ### sh-append
|
| 21 |
|
| 22 | ## Compound Data
|
| 23 |
|
| 24 | ### sh-array
|
| 25 |
|
| 26 | Array literals in shell accept any sequence of words, just like a command does:
|
| 27 |
|
| 28 | ls $mystr "$@" *.py
|
| 29 |
|
| 30 | # Put it in an array
|
| 31 | a=(ls $mystr "$@" *.py)
|
| 32 |
|
| 33 | In YSH, use [oil-array]($oil-help).
|
| 34 |
|
| 35 | ### sh-assoc
|
| 36 |
|
| 37 | In YSH, use [oil-dict]($oil-help).
|
| 38 |
|
| 39 | ## Builtins
|
| 40 |
|
| 41 | ### local
|
| 42 |
|
| 43 | ### export
|
| 44 |
|
| 45 | ### unset
|
| 46 |
|
| 47 | ### shift
|
| 48 |
|
| 49 | ### declare
|
| 50 |
|
| 51 | ### typeset
|
| 52 |
|
| 53 | Alias for [declare]($osh-help).
|