mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
49535: fix completion for ${<TAB> and ${(a)<TAB>
This commit is contained in:
parent
6b2d120077
commit
b067ab08d6
2 changed files with 8 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue