diff options
| author | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-25 01:02:03 -0600 |
|---|---|---|
| committer | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-25 01:02:03 -0600 |
| commit | 392381b2de8bce919735fce753b3740747f2b2fa (patch) | |
| tree | 34aa3101df173cb647f9fab6d922186b86df8f0a /web/content/_index.md | |
| parent | c7f23b8a5fb86f8df51809aca64415bcadcaa9f6 (diff) | |
| download | zash-feat/web-site.tar.gz | |
web: a Hugo site for zashfeat/web-site
A site in web/, built with Hugo and no theme module, so it builds offline
from one Go binary:
hugo server --source web preview on localhost:1313
hugo --source web --minify -> web/public, which is ignored
Pages: a home page with the shell's pitch, a terminal card, the four
properties that define it and a short benchmark table, plus three docs
pages (building, development, status) in a section with a sidebar. The
palette comes from packaging/zash-logo.svg: mainframe navy, periwinkle, a
signal blue. Dark only, monospace where a shell would be monospaced.
Highlighting uses classes (`markup.highlight.noClasses = false`) against
assets/css/chroma.css generated with `hugo gen chromastyles --style=
tokyonight-night`, so code sits in the page instead of a monokai box.
site.css and copy.js go through Hugo's minify+fingerprint pipeline.
Two .gitignore fixes this needed: `docs/` matched web/content/docs/ (the
generated Doxygen output is at the root, so it is `/docs/` now), and
Hugo's .hugo_build.lock is ignored.
Not published yet: zash is private and Pages is not available for a
private repository on a free plan, so web/README.md records the options.
Diffstat (limited to 'web/content/_index.md')
| -rw-r--r-- | web/content/_index.md | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/web/content/_index.md b/web/content/_index.md new file mode 100644 index 0000000..341db58 --- /dev/null +++ b/web/content/_index.md @@ -0,0 +1,74 @@ +--- +title: zash +description: A small, fast POSIX shell for z/OS UNIX System Services, in the Almquist (ash) tradition. +--- + +## Why another shell + +The z/OS `/bin/sh` is dated, and the usual alternatives are bash and zsh. +Those are comfortable interactively but slow as scripting shells, large, and +encourage scripts that run nowhere else. On z/OS that cost is real: CPU time is +billed, and every `fork()` copies an address space. + +<div class="feature-grid"> + <div class="card"> + <span class="tag">cheap processes</span> + <h3>spawn(), not fork()</h3> + <p>Children come from <code>spawn()</code>, so <code>_BPX_SHAREAS</code> + can keep them in the same address space. Builtins cost no process at all, + even in a pipeline or a command substitution.</p> + </div> + <div class="card"> + <span class="tag">plain POSIX</span> + <h3>sh scripts, not a dialect</h3> + <p>Scripts written for zash run under the existing <code>/bin/sh</code>, + dash, FreeBSD sh and bash. The Korn features z/OS scripts use are there + where they cost other scripts nothing.</p> + </div> + <div class="card"> + <span class="tag">built for z/OS</span> + <h3>ASCII or EBCDIC</h3> + <p>The character set is a compile-time choice and the source assumes + neither. File tagging, <code>STEPLIB</code> and the z/OS shell behaviours + scripts rely on are in scope.</p> + </div> + <div class="card"> + <span class="tag">pleasant</span> + <h3>An interactive shell too</h3> + <p>Job control, tab completion, history, emacs and vi editing, with + bash's key bindings. None of it is initialised by a non-interactive + shell.</p> + </div> +</div> + +## How it compares + +CPU-seconds on Linux x86-64 from `make bench`, user+sys with children +included. The benchmark scripts check each shell's answers as well as timing +it. + +| benchmark | zash | dash | bash | ksh93 | oksh | +| --- | --- | --- | --- | --- | --- | +| `$(builtin)` x 40000 | 0.01 | 8.20 | 17.99 | 0.11 | 25.24 | +| small pipelines and `$(a \| b)` | 1.10 | 2.35 | 3.16 | 1.33 | 2.32 | +| render and check 100 configs | 0.38 | 0.46 | 0.53 | 0.26 | 0.52 | +| 2000 external commands | 0.55 | 0.53 | 0.81 | 0.56 | 0.84 | + +On z/OS the gap against IBM's `/bin/sh` is far wider, because a `fork()` there +copies an address space. The full tables for both platforms are in the +[project README](https://github.com/skurtz97/zash#status). + +## Get started + +```sh +git clone https://github.com/skurtz97/zash +cd zash +make # Linux: ./zash +make check # run the suite +``` + +On z/OS, `make` builds the ASCII `./zash` with IBM Open XL C/C++ and +`make zos-ebcdic` builds the EBCDIC variant. See +[Building zash]({{< relref "docs/install" >}}) for the z/OS targets and the +address-mode notes, and [Development]({{< relref "docs/develop" >}}) for what +the test suite covers. |
