Skip to content

Commit 40609f3

Browse files
committed
dash: line editing + history via an in-tree static libedit (>=0.5.4)
dash built every version with -DSMALL, so it had no interactive line editing, history or fc builtin. From 0.5.4 dash's configure offers --with-libedit, which links the BSD editline library and undefines SMALL; 0.5.3 has no such option (it hardcodes -DSMALL) and is left as-is. dash's configure AC_MSG_ERRORs if the flag is passed without the library, so the library must exist first. Add common/libedit.sh: a static libedit (pinned 20260512-3.1) built with musl-cross against the in-tree static ncurses, mirroring common/ncurses.sh (idempotent, fetch + checksums/sources/libedit/, shvr_libedit_cflags/ldflags). Like ncurses it is fetched fresh and checksum-verified at build time; the tarball itself is not committed (/build is gitignored). Wire it into dash for >=0.5.4: build libedit, pass --with-libedit, and supply the include/lib paths. libedit needs a termcap implementation (tgetent) from ncurses, which must be linked AFTER -ledit, but dash's configure appends "-ledit" last (LIBS="-lncurses -ledit") -- the wrong static link order -- so the order is fixed in the generated Makefile. Verified across the full range on both arches: 0.5.4..0.5.13.4 now link libedit (configure: "history_init in -ledit... yes") and gain emacs/vi editing, in-session history recall and the fc builtin (interactive `fc -l` lists prior commands); 0.5.3 stays minimal (fc: not found) and its binary is byte-identical to before. dash has no persistent HISTFILE -- that is not a dash feature. Regenerated checksums/build/{amd64,arm64}/dash_* for the ten affected versions; verify_build_checksums passes on both arches.
1 parent 9beff1b commit 40609f3

23 files changed

Lines changed: 128 additions & 21 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1d64227c6ebb751b037e7c9d0b79ddac38a19c683d2fe2811b44857a8c5087db dash
1+
e0a56b54a510eac3f7791982fe36a2892872e343c694d4336ab85065014228de dash
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9f939a9e7a33c8b75573420b3f0b05fdf12fa37634c982078b433b7438639494 dash
1+
abb421cb2c050e54f69014bf25a8936769fef76055a134a9a55ab18cbeedb598 dash
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
38119f5688ce8e8668663dca0bb985decc1f8da58a55274b35ababd309a3ec2b dash
1+
26d07ae2a9a3657c31358fa7b99ac39f138a7a708647f17d7c94c53f17774922 dash
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fb5f5f8da531beaf436125d31d6d8eb4ebb36b173535e1da28079f82138a3b3f dash
1+
400eb19c0240e5ab3b118f7af229fd598e3ecc8a537c1765ecf06b697c4bf26e dash
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
874d0822b87c80db3794682c92c0a156eee010420ecc529d6356845a6e9f4588 dash
1+
09ed78683f93131effe66533d74d56a649cd176f86c96f5767253badc7e86f8c dash
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f1bd9e1042d907fc343e40f47afe7ffe47cf07f23223968fe7af0cfa58a67e71 dash
1+
0709eab2ec0a967cf7ee48afd5f171a00272eb54ceda9d6c9b086a8c3d67ed0c dash
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b2579926a9fdb935602bfec2bf8a60b9f385fe8c2e739f8461f5744e3d07e2e2 dash
1+
7e9aaa5988caf8e04e858d53bfb771b2b57c78104ca22299610cd0ccf68faa8b dash
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c82db231908b7ab43a813d5040c8426319ece2ba905780ba7e635825a8f82965 dash
1+
bf61d41bbb5f28324a20a66dbfb8543295a2e30a1ba224742a1eadfdd48c66fd dash
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a96f45e137e041aaf928b9d8e1ebe8bb6f97723ff649d95c7512acf2a8415f89 dash
1+
9234359e29be4f1ed7dce65a6d5294ea18e2457cb26c4e37b4155e419d6fe9f5 dash
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a04de4b8bccc26abce337f59a64de01a4872fdd02969485037c5965bae78831c dash
1+
3d44097a1a42886f755bb86d9cc288558f69731c113ecfc6ab3e5734ebf02b16 dash

0 commit comments

Comments
 (0)