summaryrefslogtreecommitdiff
path: root/Src/Zle/computil.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-11-25 18:51:00 +0100
committerAxel Beckert <abe@deuxchevaux.org>2015-11-25 18:51:00 +0100
commit317ec32cb1cbd15b31e17bcb07f09c52cd37c44a (patch)
tree88a02c853dfafd82a2d551d862d8dfb056b1bee6 /Src/Zle/computil.c
parent1637291aaea12ddcfd549d50d49c480185995c1a (diff)
parentcce4261a3c6f4bf78b483db61623c80e3c98d10b (diff)
downloadzsh-317ec32cb1cbd15b31e17bcb07f09c52cd37c44a.tar.gz
zsh-317ec32cb1cbd15b31e17bcb07f09c52cd37c44a.zip
Merge tag 'zsh-5.1.1-test-1' into debian
Diffstat (limited to 'Src/Zle/computil.c')
-rw-r--r--Src/Zle/computil.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index e5db0867b..60fb096be 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -185,7 +185,7 @@ cd_group(int maxg)
* descriptions. */
static void
-cd_calc()
+cd_calc(void)
{
Cdset set;
Cdstr str;
@@ -236,7 +236,7 @@ cd_sort(const void *a, const void *b)
}
static int
-cd_prep()
+cd_prep(void)
{
Cdrun run, *runp;
Cdset set;
@@ -1693,10 +1693,13 @@ ca_get_opt(Cadef d, char *line, int full, char **end)
for (p = d->opts; p; p = p->next)
if (p->active && ((!p->args || p->type == CAO_NEXT) ?
!strcmp(p->name, line) : strpfx(p->name, line))) {
+ int l = strlen(p->name);
+ if ((p->type == CAO_OEQUAL || p->type == CAO_EQUAL) &&
+ line[l] && line[l] != '=')
+ continue;
+
if (end) {
/* Return a pointer to the end of the option. */
- int l = strlen(p->name);
-
if ((p->type == CAO_OEQUAL || p->type == CAO_EQUAL) &&
line[l] == '=')
l++;