mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-06-10 06:48:03 +02:00
unposted: Record as comments some notes about namespace usage exceptions.
This commit is contained in:
parent
8801665e5b
commit
ce8909b494
4 changed files with 10 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
||||||
2024-02-03 Bart Schaefer <schaefer@zsh.org>
|
2024-02-03 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* unposted: Src/Zle/zle_tricky.c, Src/parse.c, Src/pattern.c:
|
||||||
|
Record as comments some notes about namespace usage exceptions.
|
||||||
|
|
||||||
* 52513: Doc/Zsh/mod_private.yo, Src/Modules/param_private.c,
|
* 52513: Doc/Zsh/mod_private.yo, Src/Modules/param_private.c,
|
||||||
Src/params.c, Test/v10private.ztst: nofork substitutions can
|
Src/params.c, Test/v10private.ztst: nofork substitutions can
|
||||||
use private parameters; fix crash bug on {privateFD}>&N; add
|
use private parameters; fix crash bug on {privateFD}>&N; add
|
||||||
|
|
|
@ -1499,6 +1499,7 @@ get_comp_string(void)
|
||||||
if (varq)
|
if (varq)
|
||||||
tt = clwords[clwpos];
|
tt = clwords[clwpos];
|
||||||
|
|
||||||
|
/* The only place we complete namespaces, see IIDENT below */
|
||||||
s = itype_end(tt, INAMESPC, 0);
|
s = itype_end(tt, INAMESPC, 0);
|
||||||
sav = *s;
|
sav = *s;
|
||||||
*s = '\0';
|
*s = '\0';
|
||||||
|
@ -1570,6 +1571,8 @@ get_comp_string(void)
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
MB_METACHARINIT();
|
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)
|
if (itype_end(s, IIDENT, 1) == s)
|
||||||
nnb = s + MB_METACHARLEN(s);
|
nnb = s + MB_METACHARLEN(s);
|
||||||
else
|
else
|
||||||
|
@ -1643,7 +1646,7 @@ get_comp_string(void)
|
||||||
} else {
|
} else {
|
||||||
/* In mathematical expression, we complete parameter names *
|
/* In mathematical expression, we complete parameter names *
|
||||||
* (even if they don't have a `$' in front of them). So we *
|
* (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;
|
char *cspos = zlemetaline + zlemetacs, *wptr, *cptr;
|
||||||
we = itype_end(cspos, IIDENT, 0) - zlemetaline;
|
we = itype_end(cspos, IIDENT, 0) - zlemetaline;
|
||||||
|
|
||||||
|
|
|
@ -1935,6 +1935,8 @@ par_simple(int *cmplx, int nr)
|
||||||
|
|
||||||
if (*ptr == Outbrace && ptr > tokstr + 1)
|
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)
|
if (itype_end(tokstr+1, IIDENT, 0) >= ptr)
|
||||||
{
|
{
|
||||||
char *toksave = tokstr;
|
char *toksave = tokstr;
|
||||||
|
|
|
@ -3691,6 +3691,7 @@ mb_patmatchrange(char *range, wchar_t ch, int zmb_ind, wint_t *indptr, int *mtp)
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
case PP_IDENT:
|
case PP_IDENT:
|
||||||
|
/* Could use INAMESPC here? */
|
||||||
if (wcsitype(ch, IIDENT))
|
if (wcsitype(ch, IIDENT))
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue