mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-06 09:01:13 +02:00
Added the makecommaspecial() routine that completion uses when
it is completing filenames into an open brace list.
This commit is contained in:
parent
4ae3672ce8
commit
a4d4cf5cf8
1 changed files with 14 additions and 0 deletions
14
Src/utils.c
14
Src/utils.c
|
@ -2515,6 +2515,8 @@ equalsplit(char *s, char **t)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int specialcomma;
|
||||||
|
|
||||||
/* the ztypes table */
|
/* the ztypes table */
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
|
@ -2614,10 +2616,22 @@ inittyptab(void)
|
||||||
}
|
}
|
||||||
for (s = SPECCHARS; *s; s++)
|
for (s = SPECCHARS; *s; s++)
|
||||||
typtab[STOUC(*s)] |= ISPECIAL;
|
typtab[STOUC(*s)] |= ISPECIAL;
|
||||||
|
if (specialcomma)
|
||||||
|
typtab[STOUC(',')] |= ISPECIAL;
|
||||||
if (isset(BANGHIST) && bangchar && interact && isset(SHINSTDIN))
|
if (isset(BANGHIST) && bangchar && interact && isset(SHINSTDIN))
|
||||||
typtab[bangchar] |= ISPECIAL;
|
typtab[bangchar] |= ISPECIAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**/
|
||||||
|
void
|
||||||
|
makecommaspecial(int yesno)
|
||||||
|
{
|
||||||
|
if ((specialcomma = yesno) != 0)
|
||||||
|
typtab[STOUC(',')] |= ISPECIAL;
|
||||||
|
else
|
||||||
|
typtab[STOUC(',')] &= ~ISPECIAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
#ifdef MULTIBYTE_SUPPORT
|
#ifdef MULTIBYTE_SUPPORT
|
||||||
|
|
Loading…
Reference in a new issue