From 8476e86d2d8117c3b30671034a1f5e4a6a414fe1 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 13 Jan 2000 09:50:06 +0000 Subject: zsh-workers/9306 --- Doc/Zsh/mod_zle.yo | 12 ++++++++++++ Src/Zle/zle_thingy.c | 9 +++++++++ 2 files changed, 21 insertions(+) diff --git a/Doc/Zsh/mod_zle.yo b/Doc/Zsh/mod_zle.yo index f7a4a5a7d..edca157df 100644 --- a/Doc/Zsh/mod_zle.yo +++ b/Doc/Zsh/mod_zle.yo @@ -180,6 +180,7 @@ xitem(tt(zle) tt(-A) var(old-widget) var(new-widget)) xitem(tt(zle) tt(-N) var(widget) [ var(function) ]) xitem(tt(zle) tt(-C) var(widget) var(completion-widget) var(function)) xitem(tt(zle) tt(-R) [ tt(-c) ] [ var(display-string) ] [ var(string) ... ]) +xitem(tt(zle) tt(-M) var(string)) xitem(tt(zle) tt(-U) var(string)) item(tt(zle) var(widget) tt([ -n) var(num) tt(]) tt([ -N ]) var(args) ...)( The tt(zle) builtin performs a number of different actions concerning @@ -241,6 +242,17 @@ If the optional var(string)s are given they are listed below the prompt in the same way as completion lists are printed. If no var(string)s are given but the tt(-c) option is used such a list is cleared. + +Note that this option is only useful for widgets that do not exit +immediatly after using it because the strings displayed will be erased +immediatly after return from the widget. +) +item(tt(-M) var(string))( +As with the tt(-R) option, the var(string) will be displayed below the +command line. But unlike the tt(-R) option the string not be put into +the status line but will instead be printed normally below the +prompt. This means that the var(string) will still be displayed after +the widget returns (until it is overwritten by subsequent commands). ) item(tt(-U) var(string))( This puts the characters in the var(string) in the input queue of diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c index dd990cbdc..86f0f4f1d 100644 --- a/Src/Zle/zle_thingy.c +++ b/Src/Zle/zle_thingy.c @@ -337,6 +337,7 @@ bin_zle(char *name, char **args, char *ops, int func) { 'N', bin_zle_new, 1, 2 }, { 'C', bin_zle_complete, 3, 3 }, { 'R', bin_zle_refresh, 0, -1 }, + { 'M', bin_zle_mesg, 1, 1 }, { 'U', bin_zle_unget, 1, 1 }, { 0, bin_zle_call, 0, -1 }, }; @@ -429,6 +430,14 @@ bin_zle_refresh(char *name, char **args, char *ops, char func) return 0; } +/**/ +static int +bin_zle_mesg(char *name, char **args, char *ops, char func) +{ + showmsg(*args); + return 0; +} + /**/ static int bin_zle_unget(char *name, char **args, char *ops, char func) -- cgit 1.4.1