Skip to content

Commit

Permalink
[doc/ref] Move osh-help.md into ref/chap-*
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy C committed Aug 5, 2023
1 parent 290c135 commit bd59697
Show file tree
Hide file tree
Showing 15 changed files with 1,069 additions and 1,113 deletions.
7 changes: 0 additions & 7 deletions build/doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,6 @@ cards-from-indices() {
cards-from-chapters() {
### Do all cards at once

# TODO: unify the list of help topics
local py_out=$CODE_DIR/ignored.py
# h4 tag for these
_make-help cards-from-chapter $TEXT_DIR $py_out h4 \
$HTML_DIR/doc/osh-help.html

local py_out=$CODE_DIR/help_.py
# h3
_make-help cards-from-chapter $TEXT_DIR $py_out h3 \
Expand Down Expand Up @@ -439,7 +433,6 @@ all-help() {

split-and-render doc/ysh-help-topics.md
split-and-render doc/osh-help-topics.md
split-and-render doc/osh-help.md

# Make the chapters
all-ref
Expand Down
5 changes: 2 additions & 3 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ programmers who avoid shell.
- [Oils Reference](ref/index.html) - These docs underlie `help` builtin, and
are also published online.
- Links to topics within each chapter:
- [OSH Help Topics](osh-help-topics.html)
- [YSH Help Topics](ysh-help-topics.html)
- [Index of OSH Topics](osh-help-topics.html)
- [Index of YSH Topics](ysh-help-topics.html)

## Preliminaries

Expand All @@ -39,7 +39,6 @@ These docs are for advanced users:
- [Quirks](quirks.html) for compatibility.
- [Shell Language Idioms](shell-idioms.html).


## YSH is a New Shell

- [A Tour of YSH](ysh-tour.html).
Expand Down
36 changes: 14 additions & 22 deletions doc/osh-help-topics.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ These are links to topics in the [Oils Reference](ref/index.html).
```

<h2 id="word-lang">
Word Language (<a class="group-link" href="osh-help.html#word-lang">word-lang</a>)
Word Language (<a class="group-link" href="ref/chap-word-lang.html">word-lang</a>)
</h2>

```chapter-links-osh
```chapter-links-word-lang
[Quotes] quotes 'abc' $'\n' "$var"
[Substitutions] com-sub $(command) `command` @(split command)
var-sub ${var} $0 $9
Expand All @@ -74,11 +74,11 @@ These are links to topics in the [Oils Reference](ref/index.html).
op-format ${x@P}
```

<h2 id="sublang">
Other Shell Sublanguages (<a class="group-link" href="osh-help.html#sublang">sublang</a>)
<h2 id="mini-lang">
Other Mini Languages (<a class="group-link" href="ref/chap-mini-lang.html">mini-lang</a>)
</h2>

```chapter-links-osh
```chapter-links-mini-lang
[Arithmetic] arith-context Where legacy arithmetic is allowed
sh-numbers 0xFF 0755 etc.
sh-arith 1 + 2*3 a *= 2
Expand All @@ -99,11 +99,11 @@ These are links to topics in the [Oils Reference](ref/index.html).
char-escapes \t \c \x00 \u03bc
```

<h2 id="builtins">
Builtin Commands (<a class="group-link" href="osh-help.html#builtins">builtins</a>)
<h2 id="builtin-cmd">
Builtin Commands (<a class="group-link" href="ref/chap-builtin-cmd.html">builtin-cmd</a>)
</h2>

```chapter-links-osh
```chapter-links-builtin-cmd
[I/O] read echo printf
readarray mapfile
[Run Code] source . eval trap
Expand All @@ -122,32 +122,24 @@ X [Unsupported] enable
```

<h2 id="option">
Shell Options (<a class="group-link" href="osh-help.html#option">option</a>)
Global Shell Options (<a class="group-link" href="ref/chap-option.html">option</a>)
</h2>

```chapter-links-osh
```chapter-links-option
[Errors] nounset pipefail errexit inherit_errexit
[Globbing] noglob nullglob failglob dashglob
[Debugging] xtrace X verbose X extdebug
[Interactive] emacs vi
[Other Option] X noclobber
```

<h2 id="env">
Environment Variables (<a class="group-link" href="osh-help.html#env">env</a>)
<h2 id="special-var">
Special Variables (<a class="group-link" href="ref/chap-special-var.html">special-var</a>)
</h2>

```chapter-links-osh
[Shell Options] SHELLOPTS X BASHOPTS
[Other Env] HOME PATH
```


<h2 id="special">
Special Variables (<a class="group-link" href="osh-help.html#special">special</a>)
</h2>

```chapter-links-osh
[POSIX Special] $@ $* $# $? $- $$ $! $0 $9
[Other Special] BASH_REMATCH @PIPESTATUS
[Platform] HOSTNAME OSTYPE
Expand All @@ -169,10 +161,10 @@ X [Shell State] BASH_CMDS @DIRSTACK
```

<h2 id="plugin">
Plugins and Hooks (<a class="group-link" href="osh-help.html#plugin">plugin</a>)
Plugins and Hooks (<a class="group-link" href="ref/chap-plugin.html">plugin</a>)
</h2>

```chapter-links-osh
```chapter-links-plugin
[Signals] SIGTERM X SIGINT X SIGABRT SIG...
[Traps] EXIT X ERR X DEBUG X RETURN
[Words] PS1 X PS2 X PS3 PS4
Expand Down

0 comments on commit bd59697

Please sign in to comment.