about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-01-13 09:50:06 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-01-13 09:50:06 +0000
commit8476e86d2d8117c3b30671034a1f5e4a6a414fe1 (patch)
tree73dbbf3332b87a6bfdb515ab8684ff1fd92307bf
parentf1de582703ad51ebf57576be85e5918f70f0c75d (diff)
downloadzsh-8476e86d2d8117c3b30671034a1f5e4a6a414fe1.tar.gz
zsh-8476e86d2d8117c3b30671034a1f5e4a6a414fe1.tar.xz
zsh-8476e86d2d8117c3b30671034a1f5e4a6a414fe1.zip
zsh-workers/9306
-rw-r--r--Doc/Zsh/mod_zle.yo12
-rw-r--r--Src/Zle/zle_thingy.c9
2 files changed, 21 insertions, 0 deletions
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 },
     };
@@ -431,6 +432,14 @@ bin_zle_refresh(char *name, char **args, char *ops, char func)
 
 /**/
 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)
 {
     char *p = *args;