diff options
| author | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-25 21:44:25 -0600 |
|---|---|---|
| committer | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-25 21:44:25 -0600 |
| commit | 5364f98dff13a4bc9202a14bc5f9146436366039 (patch) | |
| tree | f94f7ddb7a5ed4440c78d39e9e9f64bf2c9eb648 /web/assets/git@git.abendless.com:/srv | |
| parent | 84cf3a3705dc81c27db8d3d6f0599080435bdd26 (diff) | |
| download | zash-5364f98dff13a4bc9202a14bc5f9146436366039.tar.gz | |
interactive: completion works in the libedit build too
The libedit editor had no Tab binding at all, so the same line typed in
the two builds behaved differently: `myalias<Tab>` 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.
Diffstat (limited to 'web/assets/git@git.abendless.com:/srv')
0 files changed, 0 insertions, 0 deletions
