summary refs log tree commit diff
path: root/Src/Zle/computil.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-08-08 12:11:42 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-08-08 12:11:42 +0000
commit3bca186819e7e1e0fc6321592ccc62d75e0525be (patch)
treeed20d5f24243443b31311aa4307995f0ce5359e8 /Src/Zle/computil.c
parent5c90cf1a51b176badb0095a089df132fc5f62746 (diff)
downloadzsh-3bca186819e7e1e0fc6321592ccc62d75e0525be.tar.gz
zsh-3bca186819e7e1e0fc6321592ccc62d75e0525be.tar.xz
zsh-3bca186819e7e1e0fc6321592ccc62d75e0525be.zip
handle the right option in strings with multiple single-letter options (and correctly handle its argument) (12567)
Diffstat (limited to 'Src/Zle/computil.c')
-rw-r--r--Src/Zle/computil.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 863f15fa1..fcc79b2c4 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1108,6 +1108,7 @@ ca_get_sopt(Cadef d, char *line, char **end, LinkList *lp)
 			line++;
 		    *end = line;
 		}
+		pp = p;
 		break;
 	    }
 	} else if (!p || (p && !p->active))
@@ -1429,7 +1430,9 @@ ca_parse_line(Cadef d, int multi, int first)
 	    if (!state.oargs[state.curopt->num])
 		state.oargs[state.curopt->num] = znewlinklist();
 
-	    ddef = state.def = state.curopt->args;
+	    state.def = state.curopt->args;
+	    ddef = (state.curopt->type == CAO_NEXT && cur == compcurrent ?
+		    NULL : state.def);
 	    dopt = state.curopt;
 	    doff = pe - line;
 	    state.optbeg = state.argbeg = state.inopt = cur;