diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2014-01-28 19:14:30 +0000 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2014-01-28 19:14:30 +0000 |
commit | 584ea888115e48da43b01b5f5a7e1511a469f081 (patch) | |
tree | c9d17084ba48e6bdc1808e247ba547c038dd0e3e /Src/Zle | |
parent | c56f5aed59a4460d2382ce02eddd0948cab94b17 (diff) | |
download | zsh-584ea888115e48da43b01b5f5a7e1511a469f081.tar.gz zsh-584ea888115e48da43b01b5f5a7e1511a469f081.tar.xz zsh-584ea888115e48da43b01b5f5a7e1511a469f081.zip |
32303: simplistic completion after $x:
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/compcore.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 5c5628a8d..ac7785ab7 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -1260,6 +1260,20 @@ check_param(char *s, int set, int test) ispar = (br >= 2 ? 2 : 1); b[we-wb] = '\0'; return b; + } else if (offs > e - s && *e == ':') { + /* + * Guess whether we are in modifiers. + * If the name is followed by a : and the stuff after + * that is either colons or alphanumerics we probably are. + * This is a very rough guess. + */ + char *offsptr = s + offs; + for (; e < offsptr; e++) { + if (*e != ':' && !ialnum(*e)) + break; + } + ispar = (br >= 2 ? 2 : 1); + return NULL; } } return NULL; |