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)
|
69 |
|
70 | </div>
|
71 |
|
72 | ## `help` command
|
73 |
|
74 | When you type [`help`][help] in OSH or YSH, it shows a URL to this reference,
|
75 | or text extracted from it.
|
76 |
|
77 | [help]: chap-builtin-cmd.html#help
|
78 |
|
79 | ## About
|
80 |
|
81 | [The source files]($oils-src:doc/) for this reference are in Markdown:
|
82 |
|
83 | REPO/
|
84 | doc/
|
85 | release-index.md # /release/$VERSION/
|
86 |
|
87 | index.md # All Docs on Oils, /release/$VERSION/doc/
|
88 | getting-started.md
|
89 | ...
|
90 |
|
91 | ref/
|
92 | index.md # this page, the Oils Reference
|
93 | toc-osh.md # OSH topics
|
94 | toc-ysh.md # YSH topics
|
95 | toc-data.md # Data language topics
|
96 |
|
97 | chap-cmd-lang.md # chapter on the command language
|
98 | chap-front-end.md
|
99 | ...
|
100 |
|
101 | The URLs mirror the source, with minor differences:
|
102 |
|
103 | /release/$VERSION/
|
104 | index.html
|
105 | doc/
|
106 | index.html
|
107 | getting-started.html
|
108 | ...
|
109 |
|
110 | ref/
|
111 | index.html
|
112 | toc-osh.html
|
113 | toc-ysh.html
|
114 | toc-data.html
|
115 |
|
116 | chap-cmd-lang.html
|
117 | chap-front-end.html
|
118 | ...
|
119 |
|
120 | You can link to topics with internal anchors:
|
121 |
|
122 | - [chap-cmd-lang.html#simple-command](chap-cmd-lang.html#simple-command)
|
123 | - [chap-builtin-cmd.html#compgen](chap-builtin-cmd.html#compgen)
|
124 |
|
125 | ### Terminology
|
126 |
|
127 | This reference has a 3-level structure:
|
128 |
|
129 | 1. *Chapter* - A big HTML page.
|
130 | - A chapter may apply to OSH, YSH, or both.
|
131 | 1. *Section* - An `<h2>` heading in a chapter
|
132 | 1. *Topic* - An `<h3>` heading in a chapter.
|
133 | - It has a **globally unique** name like `doc-comment`, which is used in the
|
134 | `help` builtin.
|
135 | - A topic may apply to OSH, YSH, or both.
|
136 |
|
137 | More terminology:
|
138 |
|
139 | - *Table of Contents* - a doc with a dense list of topic links.
|
140 | - *Card* - Some topics are exported as `help` builtin "cards". They can be
|
141 | inline text, or a URL pointer. A card may also link to POSIX or bash docs.
|