diff options
| author | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2026-03-30 13:50:18 +0900 |
|---|---|---|
| committer | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2026-03-30 13:50:18 +0900 |
| commit | aaff5eda660acadc580998aec1370e98cec82180 (patch) | |
| tree | 8d83a5da108071a4f1be9529a0f4f752a180f199 | |
| parent | 54251: complete names containing dot only after ${ (diff) | |
| download | zsh-aaff5eda660acadc580998aec1370e98cec82180.tar zsh-aaff5eda660acadc580998aec1370e98cec82180.tar.gz zsh-aaff5eda660acadc580998aec1370e98cec82180.tar.bz2 zsh-aaff5eda660acadc580998aec1370e98cec82180.tar.lz zsh-aaff5eda660acadc580998aec1370e98cec82180.tar.xz zsh-aaff5eda660acadc580998aec1370e98cec82180.tar.zst zsh-aaff5eda660acadc580998aec1370e98cec82180.zip | |
54252: allow single dot as a valid (yet incomplete) parameter name
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | Src/Zle/compcore.c | 9 |
2 files changed, 12 insertions, 0 deletions
@@ -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 ${ 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) { |
