<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git/src/complete.c, branch editor/one-editor</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%2Fone-editor</id>
<link rel='self' href='https://git.abendless.com/zash.git/atom?h=editor%2Fone-editor'/>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/'/>
<updated>2026-11-26T03:44:25Z</updated>
<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>C23: constexpr internal linkage, naming and trailing commas; clangd at C23</title>
<updated>2026-11-25T18:52:38Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T18:52:38Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=e569552eb9766bc663871b6f3cb203a77e83503c'/>
<id>urn:sha1:e569552eb9766bc663871b6f3cb203a77e83503c</id>
<content type='text'>
A constexpr at file scope has external linkage, so the CSI offsets and
CSI_MAX_CALLS now say static.  The naming check gets the C23 spellings
wrap the check itself: typed constants keep the macro case, and a local
static constexpr table keeps the variable case.  .clangd says -std=c23,
which it still did not, so the editor could not read constexpr at all.
</content>
</entry>
<entry>
<title>C23: nullptr for null pointers, constexpr for typed constants</title>
<updated>2026-11-25T06:31:26Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T06:30:44Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=c7f23b8a5fb86f8df51809aca64415bcadcaa9f6'/>
<id>urn:sha1:c7f23b8a5fb86f8df51809aca64415bcadcaa9f6</id>
<content type='text'>
nullptr in every place a null pointer constant was meant; NULL is gone
from src/.

constexpr where it improves on #define without costing anything: the
IGGCSI00 work-area offsets and sizes, and the scalar sizes MVS_DSN_MAX,
CSI_FIELD_LEN, CSI_WORK_MIN, PDS_DIRBLK, CSI_WORK, CSI_MAX_CALLS.  A
constexpr in C is a constant expression, so it still bounds the arrays
that use it, and it now carries a type and can be checked with
static_assert.  Feature switches (#if), the CSIETYPE/EBCDIC byte
constants read as octets, and the related-constant enum sets stay as
they were.
</content>
</entry>
<entry>
<title>z/OS: load IGGCSI00 once and keep the block for the shell</title>
<updated>2026-11-20T00:28:13Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-20T00:28:13Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=a37d3adca684abd6ccca77c58732515efde9dd76'/>
<id>urn:sha1:a37d3adca684abd6ccca77c58732515efde9dd76</id>
<content type='text'>
The search interface was reached through LINK, which asked the system to
find and attach the module on every call -- and completion issues a call
per Tab.  The glue now LOADs the module on the first call, writes its
entry point into the block, and branches to it directly afterwards, and
the block itself is taken from 31-bit storage on the first search and
kept, because IGGCSI00 is AMODE 31 and all three of its addresses have
to stay below 2 GB.

The block is declared packed, so the compiler cannot add padding the
assembler's offsets do not know about, and aligned(8), so the save area
starts on a doubleword.  Its name field is spelled in IBM-1047 bytes
rather than as a C string, so the module is named the same way whatever
character mode this build runs in.

Verified on the machine: SYS1.MA* returns SYS1.MACLIB, SYS1.* returns
135 names, and Tab in an interactive shell completes //'SYS1.MA to
//'SYS1.MACLIB' and lists the members of that PDS.
</content>
</entry>
<entry>
<title>docs: say it in short sentences</title>
<updated>2026-11-19T00:04:28Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-19T00:04:28Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=d51368ffc48a1521796e5f582b489306da5fd5ce'/>
<id>urn:sha1:d51368ffc48a1521796e5f582b489306da5fd5ce</id>
<content type='text'>
DESIGN.md, README.md and the Doxygen comments leaned on semicolons to
join clauses and on trailing "which" clauses to add afterthoughts. Both
read as machine-written prose. Each joined clause is now its own
sentence, and the afterthoughts are either part of the sentence or a
sentence of their own.

Also corrected: README said C11 in two places (the tree builds C17), the
completion section still described the pre-HLQ-rule filters and the
64-call resume limit, and the z/OS job-control note still called
SPAWN_SETTCPGRP unverified.
</content>
</entry>
<entry>
<title>completion: no catalog search until a high-level qualifier is complete</title>
<updated>2026-11-18T23:49:34Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T23:49:21Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=199f4059adbcfbd8a54d28a2f4a4ff34b0857e84'/>
<id>urn:sha1:199f4059adbcfbd8a54d28a2f4a4ff34b0857e84</id>
<content type='text'>
A filter whose first qualifier is generic makes Catalog Management
resolve aliases generically, and the manual warns that a generic
high-level qualifier can select several catalogs at once: a high-level
of "**" means every user catalog.  Tab is no reason to ask that of the
catalog address space, so completion waits until a whole high-level
qualifier is typed before it searches at all.

The searches are narrower too: entry types U (user catalog connector)
and X (alias) are excluded, since they are not data set names; the
required return-area length is checked before a resume, as Managing
Catalogs asks; and the editor lists at most one screenful of
candidates, with a count of the rest, instead of a fixed 200.
</content>
</entry>
<entry>
<title>z/OS: one catalog per completion search, and stop after two calls</title>
<updated>2026-11-18T23:18:39Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T23:18:39Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=f0459b1227422965820c039d6d6b64336b7f1151'/>
<id>urn:sha1:f0459b1227422965820c039d6d6b64336b7f1151</id>
<content type='text'>
CSIS1CAT keeps a generic high-level qualifier from fanning a Tab key out
over every alias it matches plus the master catalog, which is what
Managing Catalogs warns about for CSIFILTK with generic filters.

Two IGGCSI00 calls already return about 2200 names -- one call fills the
64000-byte work area with ~1100 -- so 64 was sweeping a whole catalog per
keystroke for names no screen could show.

Also: `//'&lt;tab&gt;` searched for "*" and "*.*" before the filter check
refused them; it now returns before allocating anything, and tests/run.sh
can compare an EBCDIC build's transcript against a .ebcdic.exp.
</content>
</entry>
<entry>
<title>z/OS: bound the below-the-bar storage CSI completion uses</title>
<updated>2026-11-18T22:51:30Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T22:51:30Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=0a33a3a6af8aedea339fc1e0defdb421473949cb'/>
<id>urn:sha1:0a33a3a6af8aedea339fc1e0defdb421473949cb</id>
<content type='text'>
One 64 KB block, freed before the search returns, and a nested search is
refused rather than given a second one.  The second catalog search is
skipped once the candidate list is full.
</content>
</entry>
<entry>
<title>completion: bound the name before searching for it</title>
<updated>2026-11-18T20:52:06Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T20:52:06Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=732ecf37a865b0eac8fc32ecdc9085f0845edf35'/>
<id>urn:sha1:732ecf37a865b0eac8fc32ecdc9085f0845edf35</id>
<content type='text'>
GCC's -Wformat-truncation is right: the search patterns are built from
the typed word, so check its length first.  The pwd.h include went with
the HLQ code it served.
</content>
</entry>
<entry>
<title>completion: stop guessing the HLQ for a bare //NAME</title>
<updated>2026-11-18T20:51:08Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T20:51:08Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=71d138453af783f5b8d565affd17f066a54ea6d7'/>
<id>urn:sha1:71d138453af783f5b8d565affd17f066a54ea6d7</id>
<content type='text'>
`//NAME` completed against &lt;user&gt;.NAME, which meant assuming a TSO
profile.  It now offers nothing: only `//'DSN` and `//DD:` complete.
The quoted member form keeps working, and the tests drop the relative
cases.
</content>
</entry>
</feed>
