1 | ---
|
2 | title: YSH and OSH Topics by Feature
|
3 | all_docs_url: ..
|
4 | default_highlighter: oils-sh
|
5 | preserve_anchor_case: yes
|
6 | ---
|
7 |
|
8 | YSH and OSH Topics by Feature
|
9 | ====
|
10 |
|
11 | <span class="in-progress">(in progress)</span>
|
12 |
|
13 | This page links to topics in the [Oils Reference](index.html). It's organized
|
14 | differently than the [YSH Table of Contents](toc-ysh.html) or [OSH Table of
|
15 | Contents](toc-osh.html).
|
16 |
|
17 | <div id="toc">
|
18 | </div>
|
19 |
|
20 | ## Errors
|
21 |
|
22 | - [try](chap-builtin-cmd.html#try)
|
23 | - `_error`
|
24 |
|
25 | Status:
|
26 |
|
27 | - `_pipeline_status`
|
28 | - `_process_sub_status`
|
29 |
|
30 | OSH:
|
31 |
|
32 | - `$?` - not idiomatic in YSH
|
33 |
|
34 | ## Environment Variables
|
35 |
|
36 | YSH:
|
37 |
|
38 | - `ENV`
|
39 | - `simple-command` - for `FOO=bar` bindings
|
40 | - TODO: should we have a `envFromDict()` function that goes with `env -i`?
|
41 |
|
42 | OSH:
|
43 |
|
44 | - `export`
|
45 |
|
46 | ## I/O
|
47 |
|
48 | YSH:
|
49 |
|
50 | - `write`
|
51 | - `echo` is a shortcut for `write`
|
52 | - `ysh-read` -- covers `read --all`
|
53 | - `redir`
|
54 | - the `io` Object
|
55 |
|
56 |
|
57 | ## Modules
|
58 |
|
59 | - use
|
60 | - `is-main`
|
61 | - provide
|
62 | - `__provide__`
|
63 | - A module becomes an `Obj` with `__invoke__`
|
64 |
|
65 | OSH:
|
66 |
|
67 | - `source`
|
68 | - `source-guard`
|
69 |
|
70 | ## Objects
|
71 |
|
72 | - `Obj`
|
73 | - `first() rest()`
|
74 | - operator `.`
|
75 | - operator `->`
|
76 |
|
77 | ## Closures
|
78 |
|
79 | - blocks
|
80 | - procs and funcs?
|
81 |
|
82 | ## Procs
|
83 |
|
84 | - `proc-def`
|
85 | - `__invoke__` and `Obj`
|
86 | - simple-command invokes procs
|
87 |
|
88 | ## Funcs
|
89 |
|
90 | - `func-def`
|
91 | - `__call__` and `Obj`
|
92 | - call expression
|
93 |
|
94 | ## Reflection
|
95 |
|
96 | - `io` object has `eval` etc.
|
97 | - the `vm` object
|
98 |
|
99 | ## Unicode
|
100 |
|
101 | - TODO: which functions respect Unicode?
|
102 |
|
103 | ## Interactive Shell
|
104 |
|
105 | - `renderPrompt()`
|
106 |
|
107 | OSH:
|
108 |
|
109 | - `complete`
|
110 | - Oils enhancements: `compexport` `compadjust`
|