diff --git a/benchmarks/compute.sh b/benchmarks/compute.sh index d38347aa72..65d751c184 100755 --- a/benchmarks/compute.sh +++ b/benchmarks/compute.sh @@ -411,8 +411,8 @@ soil-run() { mkdir -p $BASE_DIR # Test the one that's IN TREE, NOT in ../benchmark-data - local -a oil_bin=( $OSH_CPP_NINJA_BUILD _bin/cxx-opt+bumpleak/osh) - ninja "${oil_bin[@]}" + local -a osh_bin=( $OSH_CPP_NINJA_BUILD _bin/cxx-opt+bumpleak/osh) + ninja "${osh_bin[@]}" local single_machine='no-host' @@ -426,7 +426,7 @@ soil-run() { benchmarks/id.sh shell-provenance-2 \ $single_machine $job_id _tmp \ - bash dash python2 "${oil_bin[@]}" + bash dash python2 "${osh_bin[@]}" local provenance=_tmp/provenance.txt local host_job_id="$single_machine.$job_id" diff --git a/benchmarks/osh-parser.sh b/benchmarks/osh-parser.sh index 9ffbd8d3f6..b5af6c311d 100755 --- a/benchmarks/osh-parser.sh +++ b/benchmarks/osh-parser.sh @@ -481,8 +481,8 @@ soil-run() { rm -r -f $BASE_DIR mkdir -p $BASE_DIR - local -a oil_bin=( $OSH_CPP_NINJA_BUILD ) - ninja "${oil_bin[@]}" + local -a osh_bin=( $OSH_CPP_NINJA_BUILD ) + ninja "${osh_bin[@]}" local single_machine='no-host' @@ -491,7 +491,7 @@ soil-run() { benchmarks/id.sh shell-provenance-2 \ $single_machine $job_id _tmp \ - bash dash bin/osh "${oil_bin[@]}" + bash dash bin/osh "${osh_bin[@]}" # TODO: measure* should use print-tasks | run-tasks local provenance=_tmp/provenance.txt diff --git a/benchmarks/osh-runtime.sh b/benchmarks/osh-runtime.sh index baaf0cb5ba..dfaa493092 100755 --- a/benchmarks/osh-runtime.sh +++ b/benchmarks/osh-runtime.sh @@ -342,8 +342,8 @@ soil-run() { extract # could add _bin/cxx-bumpleak/oils-for-unix, although sometimes it's slower - local -a oil_bin=( $OSH_CPP_NINJA_BUILD ) - ninja "${oil_bin[@]}" + local -a osh_bin=( $OSH_CPP_NINJA_BUILD ) + ninja "${osh_bin[@]}" local single_machine='no-host' @@ -353,7 +353,7 @@ soil-run() { # Write _tmp/provenance.* and _tmp/{host,shell}-id shell-provenance-2 \ $single_machine $job_id _tmp \ - bash dash bin/osh "${oil_bin[@]}" + bash dash bin/osh "${osh_bin[@]}" local host_job_id="$single_machine.$job_id" local raw_out_dir="$BASE_DIR/raw.$host_job_id" diff --git a/benchmarks/vm-baseline.sh b/benchmarks/vm-baseline.sh index 38a8922d55..207bc51d7f 100755 --- a/benchmarks/vm-baseline.sh +++ b/benchmarks/vm-baseline.sh @@ -148,8 +148,8 @@ soil-run() { rm -r -f $BASE_DIR mkdir -p $BASE_DIR - local -a oil_bin=( $OSH_CPP_NINJA_BUILD ) - ninja "${oil_bin[@]}" + local -a osh_bin=( $OSH_CPP_NINJA_BUILD ) + ninja "${osh_bin[@]}" local single_machine='no-host' @@ -158,7 +158,7 @@ soil-run() { benchmarks/id.sh shell-provenance-2 \ $single_machine $job_id _tmp \ - bash dash bin/osh "${oil_bin[@]}" + bash dash bin/osh "${osh_bin[@]}" # TODO: measure* should use print-tasks | run-tasks local provenance=_tmp/provenance.txt diff --git a/doc/ref/toc-osh.md b/doc/ref/toc-osh.md index c800549374..2622b0ae62 100644 --- a/doc/ref/toc-osh.md +++ b/doc/ref/toc-osh.md @@ -5,9 +5,11 @@ preserve_anchor_case: yes --- OSH Table of Contents -=============== +===================== -These are links to topics in the [Oils Reference](index.html). +[OSH]($xref) is a POSIX- and [bash]($xref)-compatible shell. + +This page has links to topics in the [Oils Reference](index.html). Siblings: [YSH Topics](toc-ysh.html), [Data Topics](toc-data.html) diff --git a/doc/ref/toc-ysh.md b/doc/ref/toc-ysh.md index e3845ccbfe..84e0bb8626 100644 --- a/doc/ref/toc-ysh.md +++ b/doc/ref/toc-ysh.md @@ -4,10 +4,13 @@ css_files: ../../web/base.css ../../web/ref-index.css ../../web/toc.css preserve_anchor_case: yes --- -OSH Table of Contents -=== +YSH Table of Contents +===================== -These are links to topics in the [Oils Reference](index.html). +[YSH]($xref) is shell with familiar syntax, JSON-like data structures, and +more. It handles errors properly. + +This page has links to topics in the [Oils Reference](index.html). Siblings: [OSH Topics](toc-osh.html), [Data Topics](toc-data.html) diff --git a/doctools/cmark.py b/doctools/cmark.py index 5e102bdf63..ced82e59fc 100755 --- a/doctools/cmark.py +++ b/doctools/cmark.py @@ -17,7 +17,7 @@ from doctools import html_lib from doctools import doc_html # templates -from doctools import oil_doc +from doctools import oils_doc # Geez find_library returns the filename and not the path? Just hardcode it as # a workaround. @@ -261,16 +261,16 @@ def Render(opts, meta, in_file, out_file, use_fastlex=True, debug_out=None): # First convert to HTML html = md2html(in_file.read()) - # Now process HTML with oil_doc + # Now process HTML with oils_doc if use_fastlex: # Note: extract code BEFORE doing the HTML highlighting. if opts.code_block_output: with open(opts.code_block_output, 'w') as f: f.write('# %s: code blocks extracted from Markdown/HTML\n\n' % opts.code_block_output) - text = oil_doc.ExtractCode(html, f) + text = oils_doc.ExtractCode(html, f) - html = oil_doc.RemoveComments(html) + html = oils_doc.RemoveComments(html) # Hack for allowing tables without
in cells, which CommonMark seems to # require? @@ -278,11 +278,11 @@ def Render(opts, meta, in_file, out_file, use_fastlex=True, debug_out=None): html = html.replace('
', '') # Expand $xref, etc. - html = oil_doc.ExpandLinks(html) + html = oils_doc.ExpandLinks(html) # blocks
# Including class=language-oil-help-topics
- html = oil_doc.HighlightCode(html, meta.get('default_highlighter'),
+ html = oils_doc.HighlightCode(html, meta.get('default_highlighter'),
debug_out=debug_out)
# h2 is the title. h1 is unused.
diff --git a/doctools/cmark.sh b/doctools/cmark.sh
index 2d585c799f..17ae1dec48 100755
--- a/doctools/cmark.sh
+++ b/doctools/cmark.sh
@@ -29,7 +29,7 @@ readonly URL="https://github.com/commonmark/cmark/archive/$CMARK_VERSION.tar.gz"
# https://pypi.org/project/Pygments/#history
#
# 7/2023: Download the wheel file
-# doctools/oil_doc.py OPTIONALLY uses this
+# doctools/oils_doc.py OPTIONALLY uses this
#
# It's only used in the blog, so let's just put it in the oilshell.org repo,
# not the oil repo
diff --git a/doctools/help_gen.py b/doctools/help_gen.py
index a6ac09e759..a067dd3e1b 100755
--- a/doctools/help_gen.py
+++ b/doctools/help_gen.py
@@ -586,7 +586,7 @@ def TopicMetadata():
elif action == 'ref-check':
from doctools import cmark
- from doctools import oil_doc
+ from doctools import oils_doc
from doctools import ref_check
chapters = []
@@ -606,7 +606,7 @@ def TopicMetadata():
# language-chapter-links-*
box_nodes = []
- html = oil_doc.HighlightCode(html, None,
+ html = oils_doc.HighlightCode(html, None,
debug_out=box_nodes)
all_toc_nodes.append({'toc': filename, 'boxes': box_nodes})
diff --git a/doctools/oil_doc.py b/doctools/oils_doc.py
similarity index 99%
rename from doctools/oil_doc.py
rename to doctools/oils_doc.py
index 8e1932ef9c..ea80c8eaae 100755
--- a/doctools/oil_doc.py
+++ b/doctools/oils_doc.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python2
"""
-oil_doc.py: HTML processing for Oil documentation.
+oils_doc.py: HTML processing for Oil documentation.
Plugins:
ExpandLinks expands $xref, etc.
diff --git a/doctools/oil_doc_test.py b/doctools/oils_doc_test.py
similarity index 80%
rename from doctools/oil_doc_test.py
rename to doctools/oils_doc_test.py
index 6ac955fb31..f0b555f710 100755
--- a/doctools/oil_doc_test.py
+++ b/doctools/oils_doc_test.py
@@ -1,13 +1,13 @@
#!/usr/bin/env python2
"""
-oil_doc_test.py: Tests for oil_doc.py
+oils_doc_test.py: Tests for oils_doc.py
"""
from __future__ import print_function
import sys
import unittest
-from doctools import oil_doc # module under test
+from doctools import oils_doc # module under test
from lazylex import html
with open('lazylex/testdata.html') as f:
@@ -25,11 +25,11 @@ def testExpandLinks(self):
NOTE: THIs could really be done with a ref like
But we're testing it
"""
- h = oil_doc.ExpandLinks(TEST_HTML)
+ h = oils_doc.ExpandLinks(TEST_HTML)
self.assert_('/blog/tags.html' in h, h)
def testShPrompt(self):
- r = oil_doc._PROMPT_LINE_RE
+ r = oils_doc._PROMPT_LINE_RE
line = 'oil$ ls -l<TAB> # comment'
m = r.match(line)
@@ -38,14 +38,14 @@ def testShPrompt(self):
print(m.group(2))
print(m.end(2))
- plugin = oil_doc.ShPromptPlugin(line, 0, len(line))
+ plugin = oils_doc.ShPromptPlugin(line, 0, len(line))
out = html.Output(line, sys.stdout)
plugin.PrintHighlighted(out)
def testHighlightCode(self):
# lazylex/testdata.html has the language-sh-prompt
- h = oil_doc.HighlightCode(TEST_HTML, None)
+ h = oils_doc.HighlightCode(TEST_HTML, None)
self.assert_('' in h, h)
#print(h)
@@ -59,7 +59,7 @@ def testPygmentsPlugin(self):
echo hi > out.txt
'''
- h = oil_doc.HighlightCode(HTML, None)
+ h = oils_doc.HighlightCode(HTML, None)
# assert there's no double escaping
self.assert_('hi > out.txt' in h, h)
diff --git a/lazylex/html.py b/lazylex/html.py
index e794ae00f0..002fbb7705 100644
--- a/lazylex/html.py
+++ b/lazylex/html.py
@@ -374,7 +374,7 @@ def ToText(s, left_pos=0, right_pos=0):
Given HTML, return text by unquoting > and < etc.
Used by:
- doctools/oil_doc.py: PygmentsPlugin
+ doctools/oils_doc.py: PygmentsPlugin
doctool/make_help.py: HelpIndexCards
In the latter case, we cold process some tags, like:
diff --git a/test/shell-vs-shell.sh b/test/shell-vs-shell.sh
index 8e6c9d214f..6958c62b45 100755
--- a/test/shell-vs-shell.sh
+++ b/test/shell-vs-shell.sh
@@ -24,7 +24,7 @@ cmark() {
}
highlight-code() {
- PYTHONPATH=. doctools/oil_doc.py highlight "$@"
+ PYTHONPATH=. doctools/oils_doc.py highlight "$@"
}
desc() {