summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorSean Kurtz <seankurtz75@gmail.com>2026-11-25 21:54:08 -0600
committerSean Kurtz <seankurtz75@gmail.com>2026-11-25 21:54:08 -0600
commit87c6a0f8f822c57b4f63bc8bb099a33307871414 (patch)
treebadd8a2f1485c15280cdf7c64a167b9ffd0e47c5 /Makefile
parentc980daddaa17460a65fe1ce7511b680279381dc1 (diff)
downloadzash-editor/one-editor.tar.gz
interactive: one editor, no libraryeditor/one-editor
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).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 2 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 9e4d912..bbf8c44 100644
--- a/Makefile
+++ b/Makefile
@@ -77,8 +77,6 @@ ZCPPFLAGS = -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200809L -D_ALL_SOURCE \
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
-# The line editor: "builtin" (no dependencies) or "libedit"
-# (make EDIT=libedit LDLIBS=-ledit).
CLANG_FORMAT = clang-format
CLANG_TIDY = clang-tidy
@@ -96,7 +94,6 @@ DUMP =
AMBLIST_STMT = LISTLOAD OUTPUT=BOTH
-EDIT = builtin
LDLIBS =
HDRS = src/ast.h src/charset.h src/exec.h src/expand.h src/interact.h src/mvsfmt.h \
@@ -105,12 +102,12 @@ COMMON = src/alias.c src/arith.c src/builtin.c src/builtin_ext.c \
src/complete.c src/cond.c src/exec.c src/expand.c src/history.c src/input.c \
src/interact.c src/jobs.c src/main.c src/mvsfmt.c src/parser.c src/pattern.c \
src/printf.c src/redir.c src/test.c src/trap.c src/unparse.c \
- src/util.c src/var.c src/edit_$(EDIT).c
+ src/util.c src/var.c src/edit_builtin.c
OBJS = src/alias.o src/arith.o src/builtin.o src/builtin_ext.o \
src/complete.o src/cond.o src/exec.o src/expand.o src/history.o src/input.o \
src/interact.o src/jobs.o src/main.o src/mvsfmt.o src/parser.o src/pattern.o \
src/printf.o src/redir.o src/test.o src/trap.o src/unparse.o \
- src/util.o src/var.o src/edit_$(EDIT).o src/sys_$(SYS).o
+ src/util.o src/var.o src/edit_builtin.o src/sys_$(SYS).o
# z/OS builds zash with IBM Open XL (ibm-clang, not clang) and without
# posix_spawn, so plain `make` builds the ASCII z/OS build there. z/OS make