OILS / doc / ref / index.md View on Github | oilshell.org

140 lines, 102 significant
1---
2title: Oils Reference
3all_docs_url: ..
4css_files: ../../web/base.css ../../web/manual.css ../../web/ref-index.css
5default_highlighter: oils-sh
6preserve_anchor_case: yes
7---
8
9<div class="doc-ref-header">
10
11**Oils Reference** &mdash;
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
29This reference has **three** tables of contents. They link to topics within 15
30chapters.
31
32<span class="in-progress">(in progress)</span>
33
34<div class="highlight">
35
36[**OSH Table of Contents**](toc-osh.html) - Compatible
37
38[**YSH Table of Contents**](toc-ysh.html) - New and Powerful
39
40</div>
41
421. [Types and Methods](chap-type-method.html)
431. [Builtin Functions](chap-builtin-func.html)
441. [Builtin Commands](chap-builtin-cmd.html)
451. [Front End](chap-front-end.html)
461. [Command Language](chap-cmd-lang.html)
471. [OSH Assignment](chap-osh-assign.html)
481. [YSH Command Language Keywords](chap-ysh-cmd.html)
491. [Word Language](chap-word-lang.html)
501. [YSH Expression Language](chap-expr-lang.html)
511. [Mini Languages](chap-mini-lang.html)
521. [Global Shell Options](chap-option.html)
531. [Special Variables](chap-special-var.html)
541. [Plugins and Hooks](chap-plugin.html)
55
56<div class="highlight">
57
58[**Data Notation Table of Contents**](toc-data.html)
59
60</div>
61
6214. [JSON / J8 Notation](chap-j8.html)
631. [Errors](chap-errors.html)
64
65<div class="highlight">
66
67[**Index**](chap-index.html)
68
69</div>
70
71## `help` command
72
73When you type [`help`][help] in OSH or YSH, it shows a URL to this reference,
74or text extracted from it.
75
76[help]: chap-builtin-cmd.html#help
77
78## About
79
80[The source files]($oils-src:doc/) for this reference are in Markdown:
81
82 REPO/
83 doc/
84 release-index.md # /release/$VERSION/
85
86 index.md # All Docs on Oils, /release/$VERSION/doc/
87 getting-started.md
88 ...
89
90 ref/
91 index.md # this page, the Oils Reference
92 toc-osh.md # OSH topics
93 toc-ysh.md # YSH topics
94 toc-data.md # Data language topics
95
96 chap-cmd-lang.md # chapter on the command language
97 chap-front-end.md
98 ...
99
100The URLs mirror the source, with minor differences:
101
102 /release/$VERSION/
103 index.html
104 doc/
105 index.html
106 getting-started.html
107 ...
108
109 ref/
110 index.html
111 toc-osh.html
112 toc-ysh.html
113 toc-data.html
114
115 chap-cmd-lang.html
116 chap-front-end.html
117 ...
118
119You can link to topics with internal anchors:
120
121- [chap-cmd-lang.html#simple-command](chap-cmd-lang.html#simple-command)
122- [chap-builtin-cmd.html#compgen](chap-builtin-cmd.html#compgen)
123
124### Terminology
125
126This reference has a 3-level structure:
127
1281. *Chapter* - A big HTML page.
129 - A chapter may apply to OSH, YSH, or both.
1301. *Section* - An `<h2>` heading in a chapter
1311. *Topic* - An `<h3>` heading in a chapter.
132 - It has a **globally unique** name like `doc-comment`, which is used in the
133 `help` builtin.
134 - A topic may apply to OSH, YSH, or both.
135
136More terminology:
137
138- *Table of Contents* - a doc with a dense list of topic links.
139- *Card* - Some topics are exported as `help` builtin "cards". They can be
140 inline text, or a URL pointer. A card may also link to POSIX or bash docs.