mirror of
git://git.suckless.org/sbase
synced 2025-05-16 15:27:56 +00:00
find: insert -a in before open parens as well
This fixes expressions like -type f '(' -name foo -o -name bar ')'.
This commit is contained in:
parent
63271b47f7
commit
191f7e693b
3
find.c
3
find.c
@ -802,7 +802,8 @@ parse(int argc, char **argv)
|
||||
} else if ((op = find_op(*arg))) { /* token is an operator */
|
||||
if (lasttype == LPAR && op->type == RPAR)
|
||||
eprintf("empty parens\n");
|
||||
if ((lasttype == PRIM || lasttype == RPAR) && op->type == NOT) { /* need another implicit -a */
|
||||
if ((lasttype == PRIM || lasttype == RPAR) &&
|
||||
(op->type == NOT || op->type == LPAR)) { /* need another implicit -a */
|
||||
*tok++ = and;
|
||||
ntok++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user