mirror of
git://git.suckless.org/sbase
synced 2024-12-21 22:50:16 +00:00
xargs: Read full lines is -I
POSIX specifies that when -I is used then arguments are delimited only by newlines.
This commit is contained in:
parent
fc85dc819d
commit
2cbf61dff9
7
xargs.c
7
xargs.c
@ -111,7 +111,11 @@ poparg(void)
|
||||
return NULL;
|
||||
while ((ch = inputc()) != EOF) {
|
||||
switch (ch) {
|
||||
case ' ': case '\t': case '\n':
|
||||
case ' ':
|
||||
case '\t':
|
||||
if (Iflag)
|
||||
goto fill;
|
||||
case '\n':
|
||||
goto out;
|
||||
case '\'':
|
||||
if (parsequote('\'') < 0)
|
||||
@ -126,6 +130,7 @@ poparg(void)
|
||||
eprintf("backslash at EOF\n");
|
||||
break;
|
||||
default:
|
||||
fill:
|
||||
fillargbuf(ch);
|
||||
argbpos++;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user