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

135 lines, 95 significant
1---
2default_highlighter: oils-sh
3preserve_anchor_case: yes
4---
5
6Oils Reference
7=============
8
9<style>
10 .highlight {
11 background-color: #eee;
12 padding-top: 0.2em;
13 padding-bottom: 0.2em;
14 padding-left: 1em;
15 padding-right: 1em;
16 }
17</style>
18
19A guide to everything in Oils (in progress).
20
21Go back to [All Docs on Oils](../index.html) for design docs and tutorials.
22
23<div id="toc">
24</div>
25
26## Online HTML
27
28<div class="highlight">
29
30Oils has two major "modes" for shell:
31
32[**OSH Table of Contents**](toc-osh.html) - Compatible
33
34[**YSH Table of Contents**](toc-ysh.html) - New and Powerful
35
36You can use OSH by itself, YSH by itself, or upgrade OSH to YSH.
37
38</div>
39
40Those two docs link to dozens of **topics** within these 12 **chapters**:
41
421. [Front End](chap-front-end.html)
431. [Command Language](chap-cmd-lang.html)
441. [Word Language](chap-word-lang.html)
451. [OSH Assignment](chap-osh-assign.html)
461. [Mini Languages](chap-mini-lang.html)
471. [Builtin Commands](chap-builtin-cmd.html)
481. [Global Shell Options](chap-option.html)
491. [Special Variables](chap-special-var.html)
501. [Plugins and Hooks](chap-plugin.html)
511. [YSH Expression Language](chap-expr-lang.html)
521. [YSH Types and Methods](chap-type-method.html)
531. [Builtin Functions](chap-builtin-func.html)
54
55<div class="highlight">
56
57[**Data Notation Table of Contents**](toc-data.html) - Languages for data are
58complementary to shell programs.
59
60</div>
61
62Topics in these 3 chapters:
63
6413. [JSON / J8 Notation](chap-j8.html)
651. Packle (TODO)
661. [Errors](chap-errors.html)
67
68## `help` builtin command
69
70When you type `help` in OSH or YSH, the command shows some of this material,
71and prints hyperlinks to it.
72
73## More About This Reference
74
75### Terminology
76
77There are 3 levels in this tree of docs, which underlies the `help` builtin:
78
791. *Chapter* - An HTML doc that's part of the reference. May apply to OSH, YSH
80 or both.
811. *Section* - An `<h2>` heading in a chapter
821. *Topic* - An `<h3>` heading in a chapter.
83 - It has text with a **globally unique** name like `doc-comment`.
84 - May apply to OSH, YSH or both.
85
86More terminology:
87
88- *Table of Contents* - a doc that links to topics, within chapters.
89- *Card* - Topics maybe be exported as `help` builtin "cards", either as inline
90 text, or a URL to online HTML. A card may also have a URL to POSIX or bash
91 docs.
92
93### Directory Structures
94
95The source code is simply a tree of Markdown files:
96
97 doc/
98 release-index.md # /release/$VERSION/
99
100 index.md # All Docs on Oils, /release/$VERSION/doc/
101 getting-started.md
102 ...
103
104 ref/
105 index.md # this page, the Oils Reference
106 toc-osh.md # link to OSH topics
107 toc-ysh.md # link to YSH topics
108 toc-data.md
109
110 chap-cmd-lang.md # chapter on the command language
111 ...
112
113
114And the URLs basically mirror the source code:
115
116 /release/$VERSION/
117 index.html
118 doc/
119 index.html
120 getting-started.html
121 ...
122
123 ref/
124 index.html
125 toc-osh.html
126 toc-ysh.html
127 toc-data.html
128
129 chap-cmd-lang.html
130 ...
131
132You can link to topics with internal anchors:
133
134- [chap-option.html#parse_at](chap-option.html#parse_at)
135- [chap-builtin-cmd.html#compgen](chap-builtin-cmd.html#compgen)