diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-05-12 04:49:46 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-05-12 04:49:46 +0000 |
commit | ea0ddb0fc6073be3d7d289e59b083f564dbd761f (patch) | |
tree | d1e3f1be8624d47e7e8a75838f9e84885a17a484 /Src/Zle/zle_thingy.c | |
parent | 53d36e795b26a945048e7a87a1a91224f8e1663a (diff) | |
download | zsh-ea0ddb0fc6073be3d7d289e59b083f564dbd761f.tar.gz zsh-ea0ddb0fc6073be3d7d289e59b083f564dbd761f.tar.xz zsh-ea0ddb0fc6073be3d7d289e59b083f564dbd761f.zip |
pws-18 dot-zsh-199905171944
Diffstat (limited to 'Src/Zle/zle_thingy.c')
-rw-r--r-- | Src/Zle/zle_thingy.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c index b879669ac..dbf982899 100644 --- a/Src/Zle/zle_thingy.c +++ b/Src/Zle/zle_thingy.c @@ -64,6 +64,7 @@ createthingytab(void) thingytab->hash = hasher; thingytab->emptytable = emptythingytab; thingytab->filltable = NULL; + thingytab->cmpnodes = strcmp; thingytab->addnode = addhashnode; thingytab->getnode = gethashnode; thingytab->getnode2 = gethashnode2; @@ -356,7 +357,7 @@ bin_zle(char *name, char **args, char *ops, int func) /* check number of arguments */ for(n = 0; args[n]; n++) ; - if(!op->o && n != 1) { + if(!op->o && n != 1 && n != 2) { zerrnam(name, "wrong number of arguments", NULL, 0); return 1; } @@ -515,17 +516,31 @@ static int bin_zle_call(char *name, char **args, char *ops, char func) { Thingy t; + struct modifier modsave; if(!zleactive || incompctlfunc || incompfunc) { zerrnam(name, "widgets can only be called when ZLE is active", NULL, 0); return 1; } + if (args[1]) { + modsave = zmod; + if (isdigit(*args[1])) { + zmod.mult = atoi(args[1]); + zmod.flags |= MOD_MULT; + } + else { + zmod.mult = 1; + zmod.flags &= ~MOD_MULT; + } + } t = rthingy(args[0]); PERMALLOC { execzlefunc(t); } LASTALLOC; unrefthingy(t); + if (args[1]) + zmod = modsave; return 0; } |