1 | ---
|
2 | title: Oils Reference
|
3 | all_docs_url: ..
|
4 | css_files: ../../web/base.css ../../web/manual.css ../../web/ref-index.css
|
5 | default_highlighter: oils-sh
|
6 | preserve_anchor_case: yes
|
7 | ---
|
8 |
|
9 | <div class="doc-ref-header">
|
10 |
|
11 | **Oils Reference** —
|
12 | [OSH](toc-osh.html) | [YSH](toc-ysh.html) | [Data Notation](toc-data.html)
|
13 |
|
14 | </div>
|
15 |
|
16 | <style>
|
17 | .highlight {
|
18 | background-color: #eee;
|
19 | padding-top: 0.1em;
|
20 | padding-bottom: 0.1em;
|
21 | padding-left: 1em;
|
22 | padding-right: 1em;
|
23 | /*
|
24 | font-size: 1.2em;
|
25 | */
|
26 | }
|
27 | </style>
|
28 |
|
29 | This reference has **three** tables of contents. They link to topics within 15
|
30 | chapters.
|
31 |
|
32 | <span class="in-progress">(in progress)</span>
|
33 |
|
34 | <div class="highlight">
|
35 |
|
36 | [**Data Notation Table of Contents**](toc-data.html)
|
37 |
|
38 | </div>
|
39 |
|
40 | 1. [JSON / J8 Notation](chap-j8.html)
|
41 | 1. [Errors](chap-errors.html)
|
42 |
|
43 | <div class="highlight">
|
44 |
|
45 | [**OSH Table of Contents**](toc-osh.html) - Compatible
|
46 |
|
47 | [**YSH Table of Contents**](toc-ysh.html) - New and Powerful
|
48 |
|
49 | </div>
|
50 |
|
51 | 3. [Types and Methods](chap-type-method.html)
|
52 | 1. [Builtin Functions](chap-builtin-func.html)
|
53 | 1. [Builtin Commands](chap-builtin-cmd.html)
|
54 | 1. [Front End](chap-front-end.html)
|
55 | 1. [Command Language](chap-cmd-lang.html)
|
56 | 1. [Standard Library](chap-stdlib.html)
|
57 | 1. [OSH Assignment](chap-osh-assign.html)
|
58 | 1. [YSH Command Language Keywords](chap-ysh-cmd.html)
|
59 | 1. [Word Language](chap-word-lang.html)
|
60 | 1. [YSH Expression Language](chap-expr-lang.html)
|
61 | 1. [Mini Languages](chap-mini-lang.html)
|
62 | 1. [Global Shell Options](chap-option.html)
|
63 | 1. [Special Variables](chap-special-var.html)
|
64 | 1. [Plugins and Hooks](chap-plugin.html)
|
65 |
|
66 | <div class="highlight">
|
67 |
|
68 | [**Index**](chap-index.html) - resolves topic name conflicts
|
69 |
|
70 | </div>
|
71 |
|
72 | [Topics By Feature](feature-index.html) - topics for modules, env vars, etc.
|
73 |
|
74 |
|
75 | ## `help` command
|
76 |
|
77 | When you type [`help`][help] in OSH or YSH, it shows a URL to this reference,
|
78 | or text extracted from it.
|
79 |
|
80 | [help]: chap-builtin-cmd.html#help
|
81 |
|
82 | ## About
|
83 |
|
84 | [The source files]($oils-src:doc/) for this reference are in Markdown:
|
85 |
|
86 | REPO/
|
87 | doc/
|
88 | release-index.md # /release/$VERSION/
|
89 |
|
90 | index.md # All Docs on Oils, /release/$VERSION/doc/
|
91 | getting-started.md
|
92 | ...
|
93 |
|
94 | ref/
|
95 | index.md # this page, the Oils Reference
|
96 | toc-osh.md # OSH topics
|
97 | toc-ysh.md # YSH topics
|
98 | toc-data.md # Data language topics
|
99 |
|
100 | chap-cmd-lang.md # chapter on the command language
|
101 | chap-front-end.md
|
102 | ...
|
103 |
|
104 | The URLs mirror the source, with minor differences:
|
105 |
|
106 | /release/$VERSION/
|
107 | index.html
|
108 | doc/
|
109 | index.html
|
110 | getting-started.html
|
111 | ...
|
112 |
|
113 | ref/
|
114 | index.html
|
115 | toc-osh.html
|
116 | toc-ysh.html
|
117 | toc-data.html
|
118 |
|
119 | chap-cmd-lang.html
|
120 | chap-front-end.html
|
121 | ...
|
122 |
|
123 | You can link to topics with internal anchors:
|
124 |
|
125 | - [chap-cmd-lang.html#simple-command](chap-cmd-lang.html#simple-command)
|
126 | - [chap-builtin-cmd.html#compgen](chap-builtin-cmd.html#compgen)
|
127 |
|
128 | ### Terminology
|
129 |
|
130 | This reference has a 3-level structure:
|
131 |
|
132 | 1. *Chapter* - A big HTML page.
|
133 | - A chapter may apply to OSH, YSH, or both.
|
134 | 1. *Section* - An `<h2>` heading in a chapter
|
135 | 1. *Topic* - An `<h3>` heading in a chapter.
|
136 | - It has a **globally unique** name like `doc-comment`, which is used in the
|
137 | `help` builtin.
|
138 | - A topic may apply to OSH, YSH, or both.
|
139 |
|
140 | More terminology:
|
141 |
|
142 | - *Table of Contents* - a doc with a dense list of topic links.
|
143 | - *Card* - Some topics are exported as `help` builtin "cards". They can be
|
144 | inline text, or a URL pointer. A card may also link to POSIX or bash docs.
|