Why Sponsor Oil? | source | all docs for version 0.15.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/oil_doc.py, which contains all the HTML plugins.
Related: How We Build Oil's Documentation.
$
$xref
: bash$blog-tag
: oil-release$oil-src
: INSTALL.txt, INSTALL.txt$blog-code-src
: interactive-shell/README.md$issue
: issue 11$oil-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: oil-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 Oil code. It's used in idioms.html, known differences, and is now the default for the Oil 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
x = 42
print(x, file=sys.stderr)
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-oil
$ echo one
one
$ for x in foo bar {
> echo $x
> }
foo
bar
```
Embeddings: