Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zargs doesn't work reliably
- X-seq: zsh-workers 22624
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: zargs doesn't work reliably
- Date: Fri, 18 Aug 2006 11:15:47 -0700
- In-reply-to: <237967ef0608172016s4a47b309sd4a78f5889cfe2c7@xxxxxxxxxxxxxx>
- In-reply-to: <237967ef0608180612n3c57c588t6c75e7bf90c6eb5@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <237967ef0608171559k1bd8053bxf7a3d1cb53ef33e7@xxxxxxxxxxxxxx> <060817194225.ZM23196@xxxxxxxxxxxxxxxxxxxxxx> <237967ef0608172016s4a47b309sd4a78f5889cfe2c7@xxxxxxxxxxxxxx> <20060818112439.GC27421@xxxxxxxxxxxxx> <237967ef0608180612n3c57c588t6c75e7bf90c6eb5@xxxxxxxxxxxxxx>
On Aug 17, 8:17pm, Mikael Magnusson wrote:
}
} > There are approximately eleventeen zillion unix/linux commands that
} > break given those file names, including rm, ls, and cp, so I'm not
} > going to get particularly worked up about zargs behaving similarly.
}
} % ls -l -- *
Yes, and you used an explicit "--" to tell ls that there might be "--"
in its argument list; it would have failed if you did not. The same
goes for "zargs -e".
} Would this be possible?
} zargs '[options]' 'command [initial-args]' [input-args]
I'm not going to agree with you about any scheme that breaks congruence
with the way xargs accepts its command and initial-args. The whole point
of zargs is to mimic xargs as closely as possible.
} Sorry, I should have looked in the manual. In my defense zargs --help
} was so helpful that i didn't suspect it left anything useful out and i
} did say i was tired :). Thanks for the pointers.
Thanks for the compliment about the help. It does say fairly early:
Options:
--eof[=eof-str], -e[eof-str]
Change the end-of-input-args string from "--" to eof-str. If
given as --eof=, an empty argument is the end; as --eof or -e,
with no (or an empty) eof-str, all arguments are input-args.
On Aug 18, 6:12am, Mikael Magnusson wrote:
}
} > What if you need an initial-arg that contains a space?
}
} I don't quite understand the question... zargs '' 'touch file\ with\
} spaces' /tmp/*
} or zargs '' 'touch "file with spaces"' /tmp/*
What if you have one initial-arg with a space, one with a backslash, one
with a single quote, and one with a double-quote?
The input-args already come to you "quoted" via the globbing mechansim.
It's much easier to pick something (including empty string, see the help
snippet above) that won't appear in the input-args than it is to quote
your way around oddities in the initial-args.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author