Commit Graph

756 Commits

Author SHA1 Message Date
tg 7b4bee7e58 collective R54 release preparation multi-merger:
install both lksh and mksh manpages from Build.sh (Martijn Dekker)
spelling fixes (Larry Hynes)
manpage improvements (Martijn Dekker)
initial port to Harvey-OS’ APEX (Ronald G. Minnich, Elbing Miss, Álvaro Jurado)
more from komh’s OS/2 port (KO Myung-Hun)
2016-11-11 23:31:39 +00:00
tg 5ee8ba10b3 fix lazy evaluation with side effects; spotted by ormaaj via IRC 2016-11-07 16:58:48 +00:00
tg 56bdf24e54 fix error propagation in TAND/TOR constructs, noted by Martijn Dekker
still a bit unsure about the whole XERROK and *xerrok stuff, but…
it seems to work
2016-10-02 22:21:47 +00:00
tg d18f9133c8 fix English (thanks to Andreas Buschka); TIL:
• to start ⇒ a start
• to begin ⇒ a beginning
2016-09-01 12:59:12 +00:00
tg e5e3fb3fc7 outstanding bumps 2016-08-25 16:21:34 +00:00
tg 879c6a0911 fix refactoro, spotted by Natureshadow; add (working) testsuite for all operators 2016-08-12 16:48:05 +00:00
tg bb7226277b fixes 2016-08-10 18:20:05 +00:00
tg f26cf0562b fixup a bad OpenBSD reaction on a bug afl showed:
set source to NULL only if the memory backing source is actually reclaimed;
fixes segfault due to NULL(+24) pointer dereference reported by Score_Under
(simplified testcase added; thanks!)
2016-08-04 20:51:35 +00:00
tg 757e25fb21 implement $KSH_MATCH and, to make it usable, ${foo@/bar/baz};
add a real-life example (for slagtc’s programmable tab completion)
to the manpage
2016-08-01 21:38:07 +00:00
tg 8f135b3904 mark some tests as !need-pass due to Perl dependencies 2016-08-01 21:29:05 +00:00
tg f21d6a3ffd fix (POSIX) errorlevel of ‘.’ when sourced file has no commands; issue discovered by Natureshadow 2016-07-28 21:39:19 +00:00
tg dd281c52ec defer to external rename(1) too 2016-07-26 21:50:46 +00:00
tg f9d131133e remove fd>9 support in favour of upcoming named file descriptors; bump 2016-07-25 21:05:25 +00:00
tg 54a8067fd2 add print -A for R53 2016-07-25 20:38:04 +00:00
tg aa9fa0ebfe add a testcase as documentation (why POSIX isn’t everything); fix comments 2016-07-25 20:36:28 +00:00
tg c3e794c4d0 rework string pooling; disable our own (rely on compiler’s)…
• if HAVE_STRING_POOLING is set to 1
• if HAVE_STRING_POOLING is set to 2 and not GCC < 4 is used
• if HAVE_STRING_POOLING is not set to 0 and LLVM or GCC >= 4 is used

Closes: LP#1580348
2016-07-25 00:04:48 +00:00
tg 8370c0dd4d experimentally use MKSH_CLRTOEOL_STRING instead of lots of spaces followed
by lots of backspaces for many clearing scenarios; requested by tmux user
slagtc on IRC
2016-07-12 23:07:10 +00:00
tg a41a62dad7 efficient $(<<<foo) and $(<<EOF … ) implementation, requested by izabera 2016-06-26 00:44:59 +00:00
tg 97d1d5e4fe fix var=<< implementation 2016-06-26 00:09:35 +00:00
tg a3cc4ffacb testcases contributed by carstenh 2016-06-26 00:06:43 +00:00
tg e4f55499c0 hexdump the NUL away 2016-06-26 00:04:30 +00:00
tg df1d7339be I hate our patch(1), it’s not NUL-safe… 2016-06-26 00:00:53 +00:00
tg 262ae5a436 fix most of the ambiguous ${[prefix] var [op [word]]} corner cases
prodded by izabera and carstenh; resolution is:
• you can’t trim a vector in mksh, still (consider ${@:-1})
• future POSIX will require non-empty “word” for most “op”s
• dissolve in order of standard → extension
• dissolve to prefer “op” over “prefix” where still necessary, mostly
2016-06-25 23:55:00 +00:00
tg 8d811d19d4 typo, found by Joerg Schilling 2016-05-31 19:59:53 +00:00
tg 9ab9ee194c fix shf.c-internal buffer overread on printing digits,
introduced by the utf_skipcols()-related fixes, more
specifically the check for combining multibyte characters
past end of given width (bogus mixed-up semantics we have here)
by reïntroducing the NUL byte from commitid 1005474EE1E4024A4E4
2016-05-17 15:36:35 +00:00
tg 55e51d9580 add, with a warning, regression testcases for:
• trailing combining character
• ${!#} and friends

the warning is: pid_t is signed (so PIDs could be negative) and may be
rather long, in some cases even longer than a C “long”; we’ll need to
handle this by adding checks (sizeof pid_t=gid_t, sizeof pid_t must be
either mksh_ari_t or u_short) and code (always print $$/$! as unsigned,
set unsigned attribute on $BASHPID and friends)
2016-05-05 22:58:19 +00:00
tg 3da248755a bump 2016-04-14 15:38:38 +00:00
tg 4c4131dddf commitid 10056D5D8AF01B31531 broke fix for Debian #783978 (add testsuite) 2016-04-09 13:55:12 +00:00
tg 1a795b7cdb expanded tests for command/whence, from Martijn Dekker 2016-03-05 15:39:36 +00:00
tg cb0604767f address latest Debian gcc-snapshot’s warnings (some actual bugs!) 2016-03-04 14:26:16 +00:00
tg c2bdb1b9dd check not-begun heredocs at EOF earlier
izabera reported they were not caught with “set -n”
2016-03-01 18:30:05 +00:00
tg ca17c0f090 sync clog 2016-02-26 22:03:10 +00:00
tg 08e1c6a9ea ADELIM can be ‘}’ too, not just ‘/’, in code that checks for / vs. //
caught by new code after segfault report by bef0rd on IRC (thanks!)
2016-02-24 01:47:32 +00:00
tg 8e7abc48eb head(1) is not portable (-n 1 not præ-POSIX/ancient, -1 not busybox)
⇒ use sed(1)

bug spotted by wbx@
2016-02-11 20:19:44 +00:00
tg 188691d285 save 200 bytes off .text by revisiting string pooling
also, forgotten version bump
2016-01-21 18:24:45 +00:00
tg 61f7661b92 fix errno in print/echo builtin; optimise (with partial rewrite) 2016-01-20 21:34:13 +00:00
tg 046d8e5b7a align with future POSIX on http://austingroupbugs.net/view.php?id=351
with accepted interpretation (*sigh*); merge VARASN|ARRAYVAR→CMDASN
2016-01-19 23:12:15 +00:00
tg 7181c9e40c somewhat surprisingly, we can do bashisms better than GNU bash now ☺ 2016-01-14 23:19:12 +00:00
tg 2492c5692b incorporate suggestions by J�rg Schilling 2016-01-13 17:20:52 +00:00
tg 4059e105a2 fstat(2) after open(2) for set -C case when initial stat(2) was !S_ISREG
to fix race condition as suggested by jilles
2015-12-31 21:03:47 +00:00
tg d83f63ac1c sync with reality; clog already says:
* [tg] Drop “stop” alias, [203]lksh(1) functionality to auto-unalias
2015-12-12 23:31:15 +00:00
tg b2b0c0bbb6 update for recent changes 2015-12-12 22:25:15 +00:00
tg c10a8b5809 move tests that logically belong together; no change 2015-12-12 16:37:44 +00:00
tg 4e036f26d1 easy portability fix from Jilles Tjoelker <jilles@stack.nl>; reason:
> In the Bourne shell, ksh93 and FreeBSD sh, the double-quote directly
> after the question mark starts an unquoted part inside the message.
2015-12-11 16:55:55 +00:00
tg 7a47656efe fix \u0000 and \x00 being ignored in $'…' and print +r expansion 2015-10-24 19:46:10 +00:00
tg 5018e4a21b another testcase, before I go changing the way let] is handled 2015-10-13 21:39:53 +00:00
tg cef386fb60 make “source” into a built-in command (keepasn, to match ksh93 and “dot”);
remove the “stop” alias and drop old Android and OS/2 hacks and auto-unalias
2015-10-09 21:36:59 +00:00
tg af35e9a6de revert most of commitid 3ec342c92b3a8874 and fixup the rest;
this should bring us closer to POSIX again
2015-10-09 17:48:53 +00:00
tg eb9050b8f8 stop using issetugid(2) for ±p check as it’s probably not the right tool 2015-10-05 17:59:00 +00:00
tg ed5cb56849 replace the code related to << changes and <<< with cleaner code,
fixing a few bugs also (including new testcases, except x=<< issue)
2015-09-06 19:47:01 +00:00