summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2003-05-22 09:48:25 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2003-05-22 09:48:25 +0000
commit1be7d4744d25d29b46f4a0b87a02cd9600ee6b74 (patch)
tree3cf7efa94211fea95f8175ea4f804816e954b40f /Src/Zle
parentc7a2d2225e41e38f54ace2809fd61d3867fdd43b (diff)
downloadzsh-1be7d4744d25d29b46f4a0b87a02cd9600ee6b74.tar.gz
zsh-1be7d4744d25d29b46f4a0b87a02cd9600ee6b74.tar.xz
zsh-1be7d4744d25d29b46f4a0b87a02cd9600ee6b74.zip
18559, 18562: make modules use proper option arguments
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zle_keymap.c6
-rw-r--r--Src/Zle/zle_main.c2
2 files changed, 2 insertions, 6 deletions
diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c
index 3a06bb632..58e5e2175 100644
--- a/Src/Zle/zle_keymap.c
+++ b/Src/Zle/zle_keymap.c
@@ -656,11 +656,7 @@ bin_bindkey(char *name, char **argv, Options ops, int func)
 	else if(OPT_ISSET(ops,'a'))
 	    kmname = "vicmd";
 	else if(OPT_ISSET(ops,'M')) {
-	    kmname = *argv++;
-	    if(!kmname) {
-		zwarnnam(name, "-M option requires a keymap argument", NULL, 0);
-		return 1;
-	    }
+	    kmname = OPT_ARG(ops,'M');
 	} else
 	    kmname = "main";
 	km = openkeymap(kmname);
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 8daf60085..047aa3d12 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1336,7 +1336,7 @@ zleaftertrap(Hookdef dummy, void *dat)
 }
 
 static struct builtin bintab[] = {
-    BUILTIN("bindkey", 0, bin_bindkey, 0, -1, 0, "evaMldDANmrsLRp", NULL),
+    BUILTIN("bindkey", 0, bin_bindkey, 0, -1, 0, "evaM:ldDANmrsLRp", NULL),
     BUILTIN("vared",   0, bin_vared,   1,  7, 0, NULL,             NULL),
     BUILTIN("zle",     0, bin_zle,     0, -1, 0, "aAcCDFgGIKlLmMNRU", NULL),
 };