mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-10-01 00:12:08 +02:00
22638: MACHINES: IRIX
users/10047: zle widget -K keymap
This commit is contained in:
parent
7b92878c24
commit
7b7905fedb
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2006-03-21 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* zsh-users/10047 : Doc/Zsh/zle.yo, Src/Zle/zle_thingy.c,
|
||||
Functions/Zle/read_from_minibuffer: add and use -K option
|
||||
to select keymap for use with widget.
|
||||
|
||||
2006-03-19 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 22638: MACHINES: compilation with cc on Irix 6.5.
|
||||
|
||||
2006-03-20 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 22371, 22372: Src/Zle/zle.h, Src/Zle/zle_word.c: use
|
||||
|
@ -332,7 +332,7 @@ xitem(tt(zle) tt(-U) var(string))
|
||||
xitem(tt(zle) tt(-K) var(keymap))
|
||||
xitem(tt(zle) tt(-F) [ tt(-L) ] [ var(fd) [ var(handler) ] ])
|
||||
xitem(tt(zle) tt(-I))
|
||||
item(tt(zle) var(widget) tt([ -n) var(num) tt(]) tt([ -N ]) var(args) ...)(
|
||||
item(tt(zle) var(widget) tt([ -n) var(num) tt(]) tt([ -N ] [ -K) var(keymap) tt(]) var(args) ...)(
|
||||
The tt(zle) builtin performs a number of different actions concerning
|
||||
ZLE.
|
||||
|
||||
@ -529,7 +529,7 @@ this may have been by a previous call to `tt(zle -I)' or by a system
|
||||
notification. To test if a zle widget may be called at this point, execute
|
||||
tt(zle) with no arguments and examine the return status.
|
||||
)
|
||||
item(var(widget) tt([ -n) var(num) tt(]) tt([ -N ]) var(args) ...)(
|
||||
item(var(widget) tt([ -n) var(num) tt(]) tt([ -N ] [ -K) var(keymap) tt(]) var(args) ...)(
|
||||
Invoke the specified widget. This can only be done when ZLE is
|
||||
active; normally this will be within a user-defined widget.
|
||||
|
||||
@ -538,6 +538,10 @@ saved and then restored after the call to tt(widget); `tt(-n) var(num)'
|
||||
sets the numerical argument temporarily to var(num), while `tt(-N)' sets it
|
||||
to the default, i.e. as if there were none.
|
||||
|
||||
With the option tt(-K), var(keymap) will be used as the current keymap
|
||||
during the execution of the widget. The previous keymap will be
|
||||
restored when the widget exits.
|
||||
|
||||
Any further arguments will be passed to the widget. If it is a shell
|
||||
function, these are passed down as positional parameters; for builtin
|
||||
widgets it is up to the widget in question what it does with them.
|
||||
|
@ -33,7 +33,7 @@ if [[ -n $keys ]]; then
|
||||
read -k $keys
|
||||
stat=$?
|
||||
else
|
||||
zle recursive-edit
|
||||
zle recursive-edit -K main
|
||||
stat=$?
|
||||
(( stat )) || REPLY=$BUFFER
|
||||
fi
|
||||
|
7
MACHINES
7
MACHINES
@ -178,8 +178,11 @@ SGI: IRIX 6.2, 6.3
|
||||
Should build `out-of-the-box'.
|
||||
|
||||
SGI: IRIX 6.5
|
||||
Should build `out-of-the-box'.
|
||||
Use of gcc for compilation is recommended.
|
||||
Should build `out-of-the-box'; however, if using the native
|
||||
compiler, "cc" rather than "c99" is recommended. Compilation
|
||||
with gcc is also reported to work. Multibyte is supported,
|
||||
for example:
|
||||
CC=cc ./configure --enable-multibyte
|
||||
|
||||
On 6.5.2, zsh malloc routines are reported not to work; also
|
||||
full optimization (cc -O3 -OPT:Olimit=0) causes problems.
|
||||
|
@ -642,7 +642,7 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
|
||||
Thingy t;
|
||||
struct modifier modsave = zmod;
|
||||
int ret, saveflag = 0;
|
||||
char *wname = *args++;
|
||||
char *wname = *args++, *keymap_restore = NULL, *keymap_tmp;
|
||||
|
||||
if (!wname)
|
||||
return !zle_usable();
|
||||
@ -680,6 +680,18 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
|
||||
zmod.mult = 1;
|
||||
zmod.flags &= ~MOD_MULT;
|
||||
break;
|
||||
case 'K':
|
||||
keymap_tmp = args[0][1] ? args[0]+1 : args[1];
|
||||
if (!keymap_tmp) {
|
||||
zwarnname(name, "keymap expected after -%c", NULL, **args);
|
||||
return 1;
|
||||
}
|
||||
if (!args[0][1])
|
||||
*++args = "" - 1;
|
||||
keymap_restore = dupstring(curkeymapname);
|
||||
if (selectkeymap(keymap_tmp, 0))
|
||||
return 1;
|
||||
break;
|
||||
default:
|
||||
zwarnnam(name, "unknown option: %s", *args, 0);
|
||||
return 1;
|
||||
@ -693,6 +705,8 @@ bin_zle_call(char *name, char **args, UNUSED(Options ops), UNUSED(char func))
|
||||
unrefthingy(t);
|
||||
if (saveflag)
|
||||
zmod = modsave;
|
||||
if (keymap_restore)
|
||||
selectkeymap(keymap_restore, 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user