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 | [**OSH Table of Contents**](toc-osh.html) - Compatible
|
37 |
|
38 | [**YSH Table of Contents**](toc-ysh.html) - New and Powerful
|
39 |
|
40 | </div>
|
41 |
|
42 | 1. [Types and Methods](chap-type-method.html)
|
43 | 1. [Builtin Functions](chap-builtin-func.html)
|
44 | 1. [Builtin Commands](chap-builtin-cmd.html)
|
45 | 1. [Front End](chap-front-end.html)
|
46 | 1. [Command Language](chap-cmd-lang.html)
|
47 | 1. [OSH Assignment](chap-osh-assign.html)
|
48 | 1. [YSH Command Language Keywords](chap-ysh-cmd.html)
|
49 | 1. [Word Language](chap-word-lang.html)
|
50 | 1. [YSH Expression Language](chap-expr-lang.html)
|
51 | 1. [Mini Languages](chap-mini-lang.html)
|
52 | 1. [Global Shell Options](chap-option.html)
|
53 | 1. [Special Variables](chap-special-var.html)
|
54 | 1. [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 |
|
62 | 14. [JSON / J8 Notation](chap-j8.html)
|
63 | 1. [Errors](chap-errors.html)
|
64 |
|
65 | <div class="highlight">
|
66 |
|
67 | [**Index**](chap-index.html)
|
68 |
|
69 | </div>
|
70 |
|
71 | ## `help` command
|
72 |
|
73 | When you type [`help`][help] in OSH or YSH, it shows a URL to this reference,
|
74 | or 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 |
|
100 | The 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 |
|
119 | You 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 |
|
126 | This reference has a 3-level structure:
|
127 |
|
128 | 1. *Chapter* - A big HTML page.
|
129 | - A chapter may apply to OSH, YSH, or both.
|
130 | 1. *Section* - An `<h2>` heading in a chapter
|
131 | 1. *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 |
|
136 | More 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.
|