diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2011-06-04 21:32:06 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2011-06-04 21:32:06 +0000 |
commit | d7582f006f950be2622bc0d5ff26aaaa20af3b7f (patch) | |
tree | ae95a74541d09eb28cd6a13907a73dfc829c56cb /Src/Zle/compcore.c | |
parent | d292edc4dc4b35438dbbf0906a568d5eedfa1761 (diff) | |
download | zsh-d7582f006f950be2622bc0d5ff26aaaa20af3b7f.tar.gz zsh-d7582f006f950be2622bc0d5ff26aaaa20af3b7f.tar.xz zsh-d7582f006f950be2622bc0d5ff26aaaa20af3b7f.zip |
29459: Further fixes for parameter flag completion,
plus drive-by fix for double-quoted parameter completion with flags
Diffstat (limited to 'Src/Zle/compcore.c')
-rw-r--r-- | Src/Zle/compcore.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 704e125bc..0a1a97c3d 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -1099,7 +1099,7 @@ mod_export char * check_param(char *s, int set, int test) { char *p; - int found = 0; + int found = 0, qstring = 0; zsfree(parpre); parpre = NULL; @@ -1126,6 +1126,7 @@ check_param(char *s, int set, int test) !(*p == String && p[1] == Snull) && !(*p == Qstring && p[1] == '\'')) { found = 1; + qstring = (*p == Qstring); break; } } @@ -1161,7 +1162,8 @@ check_param(char *s, int set, int test) /* Ignore the possible (...) flags. */ b++, br++; - if (skipparens(Inpar, Outpar, &b) > 0) { + if ((qstring ? skipparens('(', ')', &b) : + skipparens(Inpar, Outpar, &b)) > 0) { /* * We are still within the parameter flags. There's no * point trying to do anything clever here with |