diff options
author | Bart Schaefer <schaefer@zsh.org> | 2024-02-03 19:52:39 -0800 |
---|---|---|
committer | Bart Schaefer <schaefer@zsh.org> | 2024-02-03 19:52:39 -0800 |
commit | ce8909b49428e260c15dce22d764f2831295645a (patch) | |
tree | 78bd5aa466f2a2ba400e0e456cd3bd154164efcc /Src | |
parent | 8801665e5b241c3adac9c36b6135d057c5ab2a59 (diff) | |
download | zsh-ce8909b49428e260c15dce22d764f2831295645a.tar.gz zsh-ce8909b49428e260c15dce22d764f2831295645a.tar.xz zsh-ce8909b49428e260c15dce22d764f2831295645a.zip |
unposted: Record as comments some notes about namespace usage exceptions.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_tricky.c | 5 | ||||
-rw-r--r-- | Src/parse.c | 2 | ||||
-rw-r--r-- | Src/pattern.c | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index 6ceb5d87f..ea2a52390 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -1499,6 +1499,7 @@ get_comp_string(void) if (varq) tt = clwords[clwpos]; + /* The only place we complete namespaces, see IIDENT below */ s = itype_end(tt, INAMESPC, 0); sav = *s; *s = '\0'; @@ -1570,6 +1571,8 @@ get_comp_string(void) i = 0; MB_METACHARINIT(); + /* All further uses of IIDENT in this file should change to * + * INAMESPACE if this case is changed. Too ugly to risk now. */ if (itype_end(s, IIDENT, 1) == s) nnb = s + MB_METACHARLEN(s); else @@ -1643,7 +1646,7 @@ get_comp_string(void) } else { /* In mathematical expression, we complete parameter names * * (even if they don't have a `$' in front of them). So we * - * have to find that name. */ + * have to find that name. See above regarding INAMESPC */ char *cspos = zlemetaline + zlemetacs, *wptr, *cptr; we = itype_end(cspos, IIDENT, 0) - zlemetaline; diff --git a/Src/parse.c b/Src/parse.c index 859f4d0fc..2b7e003fc 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -1935,6 +1935,8 @@ par_simple(int *cmplx, int nr) if (*ptr == Outbrace && ptr > tokstr + 1) { + /* Should we allow namespace FDs, {.foo.bar}>&file ? * + * If so, change IIDENT to INAMESPACE here */ if (itype_end(tokstr+1, IIDENT, 0) >= ptr) { char *toksave = tokstr; diff --git a/Src/pattern.c b/Src/pattern.c index 2a1a514fb..1e0ae88d9 100644 --- a/Src/pattern.c +++ b/Src/pattern.c @@ -3691,6 +3691,7 @@ mb_patmatchrange(char *range, wchar_t ch, int zmb_ind, wint_t *indptr, int *mtp) return 1; break; case PP_IDENT: + /* Could use INAMESPC here? */ if (wcsitype(ch, IIDENT)) return 1; break; |