mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
54252: allow single dot as a valid (yet incomplete) parameter name
This commit is contained in:
@@ -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 ${
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user