diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2017-09-12 23:22:34 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2017-09-12 23:22:34 +0200 |
commit | 4aaf06e6678dcead65d7226bd6bde3cffeb2cb2e (patch) | |
tree | 5c8e2ac2c9a85e2e6568aed7120372e6efa074ac /Src/module.c | |
parent | f33de64abf57611e59df72da230f3d0d6760c4c5 (diff) | |
parent | 6ff4787e830f8edb3a7e32490a88a131e4b62f7f (diff) | |
download | zsh-4aaf06e6678dcead65d7226bd6bde3cffeb2cb2e.tar.gz zsh-4aaf06e6678dcead65d7226bd6bde3cffeb2cb2e.zip |
Merge tag 'zsh-5.4.2' into debian
Release 5.4.2
Diffstat (limited to 'Src/module.c')
-rw-r--r-- | Src/module.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Src/module.c b/Src/module.c index 21d68b1ac..4ae78310f 100644 --- a/Src/module.c +++ b/Src/module.c @@ -649,11 +649,21 @@ getconddef(int inf, const char *name, int autol) { Conddef p; int f = 1; + char *lookup, *s; + + /* detokenize the Dash to the form encoded in lookup tables */ + lookup = dupstring(name); + if (!lookup) + return NULL; + for (s = lookup; *s != '\0'; s++) { + if (*s == Dash) + *s = '-'; + } do { for (p = condtab; p; p = p->next) { if ((!!inf == !!(p->flags & CONDF_INFIX)) && - !strcmp(name, p->name)) + !strcmp(lookup, p->name)) break; } if (autol && p && p->module) { @@ -664,7 +674,7 @@ getconddef(int inf, const char *name, int autol) if (f) { (void)ensurefeature(p->module, (p->flags & CONDF_INFIX) ? "C:" : "c:", - (p->flags & CONDF_AUTOALL) ? NULL : name); + (p->flags & CONDF_AUTOALL) ? NULL : lookup); f = 0; p = NULL; } else { @@ -674,6 +684,7 @@ getconddef(int inf, const char *name, int autol) } else break; } while (!p); + return p; } |