54252: allow single dot as a valid (yet incomplete) parameter name

This commit is contained in:
Jun-ichi Takimoto
2026-03-30 13:50:18 +09:00
parent ec5c130abd
commit aaff5eda66
2 changed files with 12 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
2026-03-30 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 54252: Src/Zle/compcore.c: allow single dot as a valid (yet
incomplete) parameter name
* 54251: Completion/Zsh/Type/_parameters: complete names with
dot (such as .namespace.param) only after ${

View File

@@ -1240,6 +1240,15 @@ check_param(char *s, int set, int test)
ie = itype_end(e, INAMESPC, 0);
} while (ie != e);
}
else if (*e == '.')
/*
* *e == '.' and itype_end(e, INAMESPC, 0) == e.
* This means the name starts with '.' followed by a
* non-IIDENT char or by NULL. When completing, we can
* consider the single '.' as a valid (but incomplete)
* name and put the end of the name at e+1.
*/
e++;
/* Now make sure that the cursor is inside the name. */
if (offs <= e - s && offs >= b - s) {