<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git/tests/linux/i-bind.sh, branch perf/cd-inproc</title>
<subtitle>Fast Almquist-family POSIX shell for z/OS UNIX with bundled libedit</subtitle>
<id>https://git.abendless.com/zash.git/atom?h=perf%2Fcd-inproc</id>
<link rel='self' href='https://git.abendless.com/zash.git/atom?h=perf%2Fcd-inproc'/>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/'/>
<updated>2026-11-18T20:09:59Z</updated>
<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>
</feed>
