Why Sponsor Oils? | source | all docs for version 0.24.0 | all versions | oilshell.org
Warning: Work in progress! Leave feedback on Zulip or Github if you'd like this doc to be updated.
This file is essentially a unit test for doctools/oils_doc.py, which contains all the HTML plugins.
Related: How We Build Oils Documentation.
$
$xref
: bash$blog-tag
: oil-release$oils-src
: INSTALL.txt, INSTALL.txt$blog-code-src
: interactive-shell/README.md$issue
: issue 11$oils-commit
: this commitIf every pre
block in a document needs the same highlighter, you can specify
it in the front matter like this:
---
default_highlighter: oils-sh
---
My Title
========
Highlights the $
line. For example, this input
```sh-prompt
$ echo hi # comment
hi
```
produces
$ echo hi # comment
hi
A generic formatter that works for both shell and YSH code. It's used in idioms.html, known differences, and is now the default for the Oils blog.
(Detail: it's the same as sh-prompt
for now. We might want to do something
smarter.)
To override the default highlighter with none:
```none
$ echo 'no syntax highlighting'
```
Result:
$ echo 'no syntax highlighting'
Use any pygments lexer:
```python
x = 42
print(x, file=sys.stderr)
```
produces
A shell session could look like this:
```session-bash
$ echo one
one
$ for x in foo bar; do
> echo $x
> done
foo
bar
```
or
```session-ysh
$ echo one
one
$ for x in foo bar {
> echo $x
> }
foo
bar
```
Embeddings: