mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-06-07 18:02:04 +02:00
51557: Clarify availability of ksh-mode parameters, improve vi-mode detection.
This commit is contained in:
parent
8424fe5e23
commit
25dceb1dea
3 changed files with 13 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2023-03-11 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 51557: Doc/zsh/mod_ksh93.yo, Src/Modules/ksh93.c: Clarify
|
||||||
|
availability of ksh-mode parameters, improve vi-mode detection.
|
||||||
|
|
||||||
2023-03-07 Bart Schaefer <schaefer@zsh.org>
|
2023-03-07 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
* 51534: Util/printdefines: update for recent changes
|
* 51534: Util/printdefines: update for recent changes
|
||||||
|
|
|
@ -24,8 +24,10 @@ enditem()
|
||||||
|
|
||||||
subsect(Ksh Parameters)
|
subsect(Ksh Parameters)
|
||||||
cindex(parameters, ksh)
|
cindex(parameters, ksh)
|
||||||
Parameters supplied by this module that are marked with `<K>' below are
|
Parameters supplied by this module that are marked with `<K>' below
|
||||||
available only in ksh emulation.
|
are available only when ksh emulation is active before entry to the
|
||||||
|
shell function, that is, `tt(emulate ksh)' locally to a function does
|
||||||
|
not populate these parameters for that function.
|
||||||
|
|
||||||
startitem()
|
startitem()
|
||||||
vindex(.sh.command)
|
vindex(.sh.command)
|
||||||
|
@ -45,7 +47,7 @@ A named reference to the ZLE special parameter `tt(CURSOR)'.
|
||||||
vindex(.sh.edmode)
|
vindex(.sh.edmode)
|
||||||
item(tt(.sh.edmode) <K>)(
|
item(tt(.sh.edmode) <K>)(
|
||||||
In a ZLE widget, this parameter has the value tt(ESC) (tt($'\e')) if the
|
In a ZLE widget, this parameter has the value tt(ESC) (tt($'\e')) if the
|
||||||
`tt(main)' keymap is selected, and the empty string otherwise. This is
|
tt(VI) option is set and the `tt(main)' keymap is selected. This is
|
||||||
intended for use with vi-mode key bindings (`tt(bindkey -v)'). In a
|
intended for use with vi-mode key bindings (`tt(bindkey -v)'). In a
|
||||||
future revision, assigning `tt(.sh.edchar=${.sh.edmode})' is expected
|
future revision, assigning `tt(.sh.edchar=${.sh.edmode})' is expected
|
||||||
to initiate `tt(vicmd)' mode when `tt(viins)' is active, and do
|
to initiate `tt(vicmd)' mode when `tt(viins)' is active, and do
|
||||||
|
|
|
@ -168,8 +168,9 @@ ksh93_wrapper(Eprog prog, FuncWrap w, char *name)
|
||||||
if (zleactive) {
|
if (zleactive) {
|
||||||
extern mod_import_variable char *curkeymapname; /* XXX */
|
extern mod_import_variable char *curkeymapname; /* XXX */
|
||||||
extern mod_import_variable char *varedarg; /* XXX */
|
extern mod_import_variable char *varedarg; /* XXX */
|
||||||
/* How to distinguish emacs bindings? */
|
/* bindkey -v forces VIMODE so this test is as good as any */
|
||||||
if (curkeymapname && strcmp(curkeymapname, "main") == 0)
|
if (curkeymapname && isset(VIMODE) &&
|
||||||
|
strcmp(curkeymapname, "main") == 0)
|
||||||
strcpy(sh_edmode, "\e");
|
strcpy(sh_edmode, "\e");
|
||||||
else
|
else
|
||||||
strcpy(sh_edmode, "");
|
strcpy(sh_edmode, "");
|
||||||
|
|
Loading…
Reference in a new issue