mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
users/21793: Remove raw integers as glob qualifiers.
There was an ancient undocumented feature that these were treated as a file mode to "or" with that of the file under test. The only documented way of doing this has always been the "f" qualifier, so removed the effect of raw integers to make errors more obvious.
This commit is contained in:
parent
74722c7392
commit
895e9beb29
3 changed files with 15 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
|||
2016-07-28 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* users/21793: README, Src/glob.c: remove ancient undocumented
|
||||
pre-"f" glob qualifer feature that unqualified integers were
|
||||
treated as octal file mode.
|
||||
|
||||
2016-07-27 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* unposted: Functions/Misc/add-zle-hook-widget: Prefix function's
|
||||
|
|
8
README
8
README
|
@ -79,6 +79,14 @@ Other aspects of EXIT trap handling have not changed --- there is still
|
|||
only one EXIT trap at any point in a programme, so it is not generally
|
||||
useful to combine POSIX and non-POSIX behaviour in the same script.
|
||||
|
||||
4) There was an undocumented feature dating from the early days of zsh
|
||||
that glob qualifiers consisting only of the digits 0 to 7 were treated
|
||||
as an octal file mode to "and" with the modes of files being tested.
|
||||
This has been removed in order to be more sensitive to syntax errors.
|
||||
The "f" qualifier has for many years been the documented way of testing
|
||||
file modes; it allows the "and" test ("*(f+1)" is the documented
|
||||
equivalent of "*(1)") as well as many other forms.
|
||||
|
||||
Incompatibilities between 5.0.8 and 5.2
|
||||
---------------------------------------
|
||||
|
||||
|
|
|
@ -1282,14 +1282,7 @@ zglob(LinkList list, LinkNode np, int nountok)
|
|||
*ptr = '-';
|
||||
while (*s && !newcolonmod) {
|
||||
func = (int (*) _((char *, Statptr, off_t, char *)))0;
|
||||
if (idigit(*s)) {
|
||||
/* Store numeric argument for qualifier */
|
||||
func = qualflags;
|
||||
data = 0;
|
||||
sdata = NULL;
|
||||
while (idigit(*s))
|
||||
data = data * 010 + (*s++ - '0');
|
||||
} else if (*s == ',') {
|
||||
if (*s == ',') {
|
||||
/* A comma separates alternative sets of qualifiers */
|
||||
s++;
|
||||
sense = 0;
|
||||
|
|
Loading…
Reference in a new issue