<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git, branch editor/vi-v-dot</title>
<subtitle>Fast Almquist-family POSIX shell for z/OS UNIX with bundled libedit</subtitle>
<id>https://git.abendless.com/zash.git/atom?h=editor%2Fvi-v-dot</id>
<link rel='self' href='https://git.abendless.com/zash.git/atom?h=editor%2Fvi-v-dot'/>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/'/>
<updated>2026-11-26T03:54:21Z</updated>
<entry>
<title>Merge pull request #39 from skurtz97/editor/one-editor</title>
<updated>2026-11-26T03:54:21Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:54:21Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=8783efd12edd6ab739b8eee7776d6c744df4f677'/>
<id>urn:sha1:8783efd12edd6ab739b8eee7776d6c744df4f677</id>
<content type='text'>
interactive: one editor, no library</content>
</entry>
<entry>
<title>interactive: one editor, no library</title>
<updated>2026-11-26T03:54:08Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:54:08Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=87c6a0f8f822c57b4f63bc8bb099a33307871414'/>
<id>urn:sha1:87c6a0f8f822c57b4f63bc8bb099a33307871414</id>
<content type='text'>
libedit was a compile-time alternative (`make EDIT=libedit`).  It goes:
FreeBSD and NetBSD `sh` use it because it is in their base system, which
is not the case on z/OS, and it cost about a third of a millisecond to
reach the prompt -- three more shared libraries, `el_init()`, an
`~/.editrc` read and a copy of the history -- for the same cost per key.
What it bought was `~/.editrc` bindings and a kill ring; `bind` and the
built-in editor's own bindings cover the keys, and a second editor meant
a second build mode and a second set of interactive expectations, with
seven tests skipping under it.

Everything that existed only to serve two editors goes with it: the
`EDIT` switch and the two `edit_$(EDIT)` paths in the makefile, the
`$ZASH_EDITOR` variable the tests used to skip, the skip guards in
`tests/linux/`, the NUL stripping in `ptydrive.py` that libedit's redraw
needed, and the parallel paragraphs in README.md, DESIGN.md,
bench/README.md and the two website pages.  `bench/README.md` keeps the
measurement, since that is why the decision is written in DESIGN.md.

Checked on Linux (97 passed, 1 skipped, the one known local failure in
linux/i-dscomplete) and on z/OS (64 passed, 3 skipped, 0 failed, plus the
EBCDIC build).
</content>
</entry>
<entry>
<title>Merge pull request #38 from skurtz97/edit/libedit-completion</title>
<updated>2026-11-26T03:44:35Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:44:35Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=c980daddaa17460a65fe1ce7511b680279381dc1'/>
<id>urn:sha1:c980daddaa17460a65fe1ce7511b680279381dc1</id>
<content type='text'>
interactive: completion works in the libedit build too</content>
</entry>
<entry>
<title>interactive: completion works in the libedit build too</title>
<updated>2026-11-26T03:44:25Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:44:25Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=5364f98dff13a4bc9202a14bc5f9146436366039'/>
<id>urn:sha1:5364f98dff13a4bc9202a14bc5f9146436366039</id>
<content type='text'>
The libedit editor had no Tab binding at all, so the same line typed in
the two builds behaved differently: `myalias&lt;Tab&gt;` completed under the
built-in editor and ran the name as written under libedit. Completion is
not an editor feature here — it is the shell's, from complete.c — so the
boundary moves: complete.c now owns the escaping (`complete_escaped()`)
and the candidate listing (`complete_listing()`), and each editor only
inserts the result into its line.

For libedit that means a function bound to ^I: it deletes the word,
inserts the escaped candidate, finishes a unique one with a space and
asks for a full redraw (a tail-only refresh left the terminal showing a
line the shell did not have). Two things cost time to find: the binding
name is the editrc spelling `^I`, not a literal Tab, and EL_EDITOR has to
be set before EL_ADDFN/EL_BIND, because selecting an editor replaces the
key map and drops what was bound before.

$ZASH_EDITOR says which editor is compiled in. Keys, redraw and listings
are the editor's own — libedit reads ~/.editrc, and its redraw of a
prompt that starts with an OSC title leaves one space too many on the
screen — so the interactive tests that encode the built-in editor's
bindings and drawing skip under libedit, with a reason. i-complete, which
covers the completion both now share, passes under both.

tests/tools/ptydrive.py drops NUL bytes from what it compares: libedit
writes a run of them after "erase to end of line" when it redraws, and a
NUL puts nothing on a screen.

Built-in build: 97 passed, 1 skipped, 1 failed (linux/i-dscomplete, the
known local failure). libedit build: 6 passed, 7 skipped, 0 failed.
</content>
</entry>
<entry>
<title>Merge pull request #37 from skurtz97/bench/startup-rounds</title>
<updated>2026-11-26T03:26:03Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:26:03Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=84cf3a3705dc81c27db8d3d6f0599080435bdd26'/>
<id>urn:sha1:84cf3a3705dc81c27db8d3d6f0599080435bdd26</id>
<content type='text'>
bench: make the start-up number a minimum of interleaved rounds</content>
</entry>
<entry>
<title>bench: make the start-up number a minimum of interleaved rounds</title>
<updated>2026-11-26T03:25:47Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:25:47Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=ab003863f9a3eaf6099d560af64022b7bd7c2f2a'/>
<id>urn:sha1:ab003863f9a3eaf6099d560af64022b7bd7c2f2a</id>
<content type='text'>
startup.sh ran BENCH_N starts once, and on the shared z/OS machine the
same binary measured anywhere between 5 and 14 ms depending on the hour.

Now each cell is the fastest of BENCH_R rounds (default 5) of BENCH_N
starts, and a row's two columns are measured one after the other inside
each round, so `-c :` and `script` see the same load instead of one
following five rounds of the other. A minimum is the right summary
because contention only adds time.

Measured that way on cbt today, zash is 1.34 ms for `-c :` and 1.36 ms
for a script, and the z/OS sh 2.16 and 2.18 — the same two numbers
bench/README.md already claimed from a quieter machine, which is the
point: the method now reproduces them.

Also records the rule the ksh88 constraint implies: where zash and the
z/OS sh disagree, zash keeps the better behaviour unless a ksh88 script
could observe it, and the one such case — a failed redirection,
assignment or read being 2 rather than 1 — is accepted because POSIX
does not pin it and the shells disagree among themselves.
</content>
</entry>
<entry>
<title>Merge pull request #36 from skurtz97/bench/compat-triage</title>
<updated>2026-11-26T03:22:24Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:22:24Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=1109062b7c8418026fc5461f81cd98632f5e5658'/>
<id>urn:sha1:1109062b7c8418026fc5461f81cd98632f5e5658</id>
<content type='text'>
bench: read the 28 differences from the host's sh</content>
</entry>
<entry>
<title>bench: read the 28 differences from the host's sh</title>
<updated>2026-11-26T03:22:07Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:22:07Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=d9ea106455acb97d06607e74d5ec0bafb7ad3f6b'/>
<id>urn:sha1:d9ea106455acb97d06607e74d5ec0bafb7ad3f6b</id>
<content type='text'>
Every script that zash and the IBM sh disagree on has now been read. None
is a zash bug: zash matches dash on all 38 (that is what the suite says),
and the differences are the IBM shell's — it cannot do `[ a \&lt; b ]`, `fc`,
or arithmetic across a newline; it exits where `command eval` should only
set a status; it keeps literal quotes inside `${y:-"q r"}` and empty
fields from unquoted `$@`; its exit status is 1 for every failure.

The one row that is our choice is the status one: the ash family's 2 for
a failed redirection, which DESIGN.md already lists and this now records
in the table, so that a ksh script on z/OS testing `$?` against 1 is not
a surprise.
</content>
</entry>
<entry>
<title>Merge pull request #35 from skurtz97/bench/host-sh-compat</title>
<updated>2026-11-26T03:04:56Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:04:56Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=6ef928c4d698478997057b107076d65720cfbcdd'/>
<id>urn:sha1:6ef928c4d698478997057b107076d65720cfbcdd</id>
<content type='text'>
bench: measure zash against the sh this host has</content>
</entry>
<entry>
<title>bench: measure zash against the sh this host has</title>
<updated>2026-11-26T03:04:44Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T03:04:44Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=aa1a6d2179d4c1c139847aba0bb7675ce2e0b20f'/>
<id>urn:sha1:aa1a6d2179d4c1c139847aba0bb7675ce2e0b20f</id>
<content type='text'>
`compat.sh` runs every tests/posix script under zash and under another
shell, each in an empty directory, and prints the ones whose output or
status differ.  It is not a test: the .exp files are a reference shell's
output, and on z/OS /bin/sh is IBM's ksh-lineage shell with wording and
statuses of its own.  The count is how close a script naming #!/bin/sh
gets to its meaning here; the diffs say which differences to read.

On cbt, 10 of the 38 scripts agree and 28 differ, most of them on
diagnostics.
</content>
</entry>
</feed>
