diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/Zle/compcore.c | 14 |
2 files changed, 8 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog index 4bc42ce9a..3278e7b20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2021-11-01 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> + + * 49535: Src/Zle/compcore.c: fix completion of parameter names + for ${<TAB> and ${(a)<TAB> + 2021-10-31 Bart Schaefer <schaefer@zsh.org> * users/27302: Completion/Unix/Type/_remote_files: respect setting diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 2f3d53834..c6deff756 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -1187,9 +1187,9 @@ check_param(char *s, int set, int test) return NULL; /* Ignore the possible (...) flags. */ - tb = ++b, br++; - if ((qstring ? skipparens('(', ')', &tb) : - skipparens(Inpar, Outpar, &tb)) > 0 || tb - s >= offs) { + b++, br++; + if ((qstring ? skipparens('(', ')', &b) : + skipparens(Inpar, Outpar, &b)) > 0 || b - s > offs) { /* * We are still within the parameter flags. There's no * point trying to do anything clever here with @@ -1200,14 +1200,6 @@ check_param(char *s, int set, int test) ispar = 2; return NULL; } - if ((qstring ? '(' : Inpar) == *b) { - /* - * We are inside the braces but on the opening paren. - * There is nothing useful to complete here? - */ - return NULL; - } else - b = tb; /* Skip over the flags */ for (tb = p - 1; tb > s && *tb != Outbrace && *tb != Inbrace; tb--); if (tb > s && *tb == Inbrace && (tb[-1] == String || *tb == Qstring)) |