diff --git a/NEWS b/NEWS index 2a61ac91ab9c..47f64e55e9c6 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,12 @@ This documents significant changes in the dev branch of ksh 93u+m. For full details, see the git log at: https://github.com/ksh93/ksh Uppercase BUG_* IDs are shell bug IDs as used by the Modernish shell library. +2024-12-22: + +- In the emacs/gmacs line editor, the ESC [ macro feature, which is + documented to input the value of the alias __, now actually works. + A decades-old bug in internal variable handling rendered it inoperative. + 2024-12-21: - Fixed a bug in the emacs/gmacs line editor where a command repeat count diff --git a/src/cmd/ksh93/edit/completion.c b/src/cmd/ksh93/edit/completion.c index 487278b39e15..e1c57cc91aea 100644 --- a/src/cmd/ksh93/edit/completion.c +++ b/src/cmd/ksh93/edit/completion.c @@ -601,9 +601,9 @@ int ed_macro(Edit_t *ep, int i) genchar buff[LOOKAHEAD+1]; if(i != '@') ep->e_macro[1] = i; - /* undocumented feature, macros of the form [c evoke alias __c */ + /* macros of the form [c evoke alias __c */ if(i=='_') - ep->e_macro[2] = ed_getchar(ep,1); + ep->e_macro[2] = i = ed_getchar(ep,1); else ep->e_macro[2] = 0; if (isalnum(i)&&(np=nv_search(ep->e_macro,sh.alias_tree,0))&&(out=nv_getval(np))) diff --git a/src/cmd/ksh93/include/version.h b/src/cmd/ksh93/include/version.h index 5297065544f1..9ab358a64860 100644 --- a/src/cmd/ksh93/include/version.h +++ b/src/cmd/ksh93/include/version.h @@ -18,7 +18,7 @@ #include #include "git.h" -#define SH_RELEASE_DATE "2024-12-21" /* must be in this format for $((.sh.version)) */ +#define SH_RELEASE_DATE "2024-12-22" /* must be in this format for $((.sh.version)) */ /* * This comment keeps SH_RELEASE_DATE a few lines away from SH_RELEASE_SVER to avoid * merge conflicts when cherry-picking dev branch commits onto a release branch.