From aaff5eda660acadc580998aec1370e98cec82180 Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Mon, 30 Mar 2026 13:50:18 +0900 Subject: [PATCH] 54252: allow single dot as a valid (yet incomplete) parameter name --- ChangeLog | 3 +++ Src/Zle/compcore.c | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 12a113842..1963b94dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2026-03-30 Jun-ichi Takimoto + * 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 ${ diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index fb703f801..54e6146ad 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -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) {