<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git/tests/linux, branch bench/startup-rounds</title>
<subtitle>Fast Almquist-family POSIX shell for z/OS UNIX with bundled libedit</subtitle>
<id>https://git.abendless.com/zash.git/atom?h=bench%2Fstartup-rounds</id>
<link rel='self' href='https://git.abendless.com/zash.git/atom?h=bench%2Fstartup-rounds'/>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/'/>
<updated>2026-11-26T02:30:22Z</updated>
<entry>
<title>interactive: a prompt's width counts columns, not bytes</title>
<updated>2026-11-26T02:30:22Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-26T02:30:22Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=deb0ed011fe2cfc7058facb3f63b7feaeb8d4a8e'/>
<id>urn:sha1:deb0ed011fe2cfc7058facb3f63b7feaeb8d4a8e</id>
<content type='text'>
The built-in editor skipped `ESC [ ...` sequences when working out where
the prompt ends.  Colour and titles are not all CSI: an OSC title or
hyperlink runs to BEL or `ESC \`, DCS runs the same way, and `tput sgr0`
is the three-byte `ESC ( B` before `ESC [ m`.  A prompt built with
`$(tput ...)` was measured wrong, which costs the cursor position and
with it the wrapped-line arithmetic.

`esc_seq_len()` in interact.c now walks what a terminal understands, and
edit_builtin.c uses it.  The libedit build shares the walk: it brackets
control runs for `EL_PROMPT_ESC`, and adds the space libedit needs when
a prompt ends in one, since libedit attaches a literal run to the
character after it.

bench/editor.py measures the two costs run.sh cannot see, start to first
prompt and per-key echo, on a pty; bench/README.md has the table.  The
release, z/OS and fuzz builds move to -O3 while the sanitizer and
coverage builds stay low: inlined frames make their reports harder to
read than the few percent they would gain.
</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>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>
<entry>
<title>editor: `bind`, and prompts that take bash's \[ \] markers</title>
<updated>2026-11-18T20:09:59Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T20:09:51Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=03d91b9a86c8af39ff45033f7ad14d458fe242e1'/>
<id>urn:sha1:03d91b9a86c8af39ff45033f7ad14d458fe242e1</id>
<content type='text'>
`bind -l` lists the actions the editor can run and `bind
'^[[H'=beginning-of-line` gives one to a key sequence, in the notation
the BSD shells use.  Only the names edit_key() already knows are
accepted, so a binding cannot do anything a key could not; `-m` (macro)
is refused rather than ignored.  The defaults stay bash's: this is for
people whose .kshrc moves the arrow keys, not a move towards ksh.

`\[` and `\]` in PS1 say "this part does not move the cursor".  The
width rule already skips control sequences, so dropping the markers is
the whole implementation, and a coloured prompt now shows its text
instead of the markers.
</content>
</entry>
<entry>
<title>edit_builtin: the emacs keys bash users reach for</title>
<updated>2026-11-18T19:05:38Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T19:05:38Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=bc0cab203252597d29cbce7fcba0ca4fadfbc846'/>
<id>urn:sha1:bc0cab203252597d29cbce7fcba0ca4fadfbc846</id>
<content type='text'>
meta-u, meta-l and meta-c change the case of a word, meta-t transposes
the words either side of the cursor, meta-. inserts the last word of the
previous line and meta-\\ collapses the blanks around the cursor.  The
rest of the map was already bash's: a BSD sh or a bash prompt is the
target, not ksh's.
</content>
</entry>
<entry>
<title>linux/i-startup: do not depend on the host /etc/profile</title>
<updated>2026-11-18T18:56:48Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T18:56:48Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=98f58712dee0f15e0b2a859b9cab76960cd2a213'/>
<id>urn:sha1:98f58712dee0f15e0b2a859b9cab76960cd2a213</id>
<content type='text'>
A login shell reads /etc/profile before ~/envfile, and a distribution's
copy is bash-flavoured: it fails on a substitution only bash accepts and
it sets USER from the account database, so \u printed the real user.  The
ENV file now sets USER back, and the host's own diagnostic is dropped
from the transcript.
</content>
</entry>
<entry>
<title>Read startup files like the interactive shell they belong to</title>
<updated>2026-11-18T18:55:52Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T18:55:52Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=f1767f5f5891300ff42c1570c0415b00f2f9faf5'/>
<id>urn:sha1:f1767f5f5891300ff42c1570c0415b00f2f9faf5</id>
<content type='text'>
A failing line in $ENV ended the shell: run_input() only installed its
recovering handler for the main loop, so sh_error() found no handler and
called exit_shell().  An interactive shell must not exit for a command
that fails (POSIX 2.5.3), and a .kshrc shared with ksh is full of lines
zash rejects.

Startup files now run with RI_RECOVER, which recovers from an error
without printing a prompt, and the rest of the file is still read.
</content>
</entry>
<entry>
<title>Hardening: ENV expanded and ignored for set-ID shells; no truncated profile path</title>
<updated>2026-11-17T18:52:50Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-15T23:28:46Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=e06238a015001bc125d410e499736c90fe3470a8'/>
<id>urn:sha1:e06238a015001bc125d410e499736c90fe3470a8</id>
<content type='text'>
POSIX: ENV is parameter-expanded, and not used when the real and
effective user or group IDs differ.  The expansion reuses the prompt's
contained expansion (expand_quietly), so a bad ENV cannot unwind into
startup.  $HOME/.profile is not sourced if the path would be truncated.
</content>
</entry>
<entry>
<title>z/OS: file tagging, catalog completion, time, and per-command options</title>
<updated>2026-11-15T23:12:40Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-15T23:12:40Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=73397aa38958ddfe0b0cadbbf5e7e55ba88da644'/>
<id>urn:sha1:73397aa38958ddfe0b0cadbbf5e7e55ba88da644</id>
<content type='text'>
Tagging and conversion (sys_zos.c, redir.c, input.c, var.c, exec.c):
- _TAG_REDIR_IN/OUT/ERR as /bin/sh documents them, cached by variable
  hooks so redirection tests a byte; honoured as a prefix on external
  commands and on pipeline stages.
- ASCII builds tag new output and here-document files as text, tag
  pipes IBM-1047 (set +o pipetag to stop), and switch on autoconvert.
- Scripts, . files, profile and ENV are read in either character set:
  tagged files get F_CONTROL_CVT, untagged ones are sniffed.
- tag/chtag primitives (sys_tag_get/sys_tag_set) for a builtin to come.

Data set completion (complete.c, mvsfmt.[ch], zos_csi.s):
- //'HLQ.PART, "//'HLQ.PART, //NAME (user HLQ), //'DSN(MEM, //DD:NAME
  complete one qualifier at a time from the Catalog Search Interface,
  PDS directories and the TIOT.
- IGGCSI00 is called through HLASM glue that switches to AMODE 31 and
  keeps every register and parameter below the bar (VERIFY).
- The work-area, directory and TIOT decoders are portable and run on
  Linux against a stand-in catalog that produces the real EBCDIC bytes,
  including CSI resume and directory-block splits; fuzzed with
  libFuzzer (make fuzz).
- A lone completion inside quotes now closes the quote.

Other z/OS features:
- time [-p] keyword with shell/children CPU split.
- set -o jobnames (_BPX_JOBNAME per command), set -o shareas
  (_BPX_SHAREAS=YES for foreground commands only), set -o msgid
  (ZSHnnnnE/W message IDs), ulimit -M (MEMLIMIT), ZOS_SYSNAME,
  ZOS_SYSPLEX, ZOS_RELEASE, ZOS_ASID, ZOS_JOBNAME, prompt \S.
- BPXWDYN entry point for an alloc builtin to come.

Checking z/OS code off z/OS:
- make zos-lint compiles sys_zos.c against declarations transcribed
  from the z/OS headers, and the rest with the MVS paths forced on.
- make mvs-asan runs the suite with the MVS paths on, under ASan/UBSan.
- make asan and make valgrind now check for leaks.
</content>
</entry>
<entry>
<title>Edge-case, integration and z/OS tests, including z/OS stand-ins</title>
<updated>2026-11-15T15:20:17Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-15T15:20:17Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=cadb5af9226553357a48b86bdaf057b10bf44d1d'/>
<id>urn:sha1:cadb5af9226553357a48b86bdaf057b10bf44d1d</id>
<content type='text'>
New groups: tests/scripts (integration, expectations from dash) and
z/OS data set, tso, EBCDIC and tagging tests with Linux stand-ins.
</content>
</entry>
</feed>
