Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: zmv with alternative commands



On Wed, 03 Jul 2013 08:57:19 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> On Jul 3, 12:17pm, Peter Stephenson wrote:
> } Subject: PATCH: zmv with alternative commands
> }
> } I wanted to use zmv to "p4 integrate" (think alternatively of "git mv"
> } --- not the same but should indicate what I'm using zmv for) some files.
> } I encountered two problems: zmv doesn't split the words of the program
> } you supply with -p, and also "p4 integrate" doesn't understand a
> } following "--" to indicate the end of options for the subcommand.  I've
> } introduced -P for the latter case.
> 
> Perhaps -P could itself take an argument which is the end-of-options
> marker?  E.g. some older commands don't understand "--" but do accept
> a single "-" all by itself.

That will already work since the end-of-option marker comes after the
program:

  zmv -P "cp --" foo bar

pws



Messages sorted by: Reverse Date, Date, Thread, Author