From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@sunsite.dk>
Subject: PATCH: _zmv
Date: Tue, 07 Jan 2003 16:53:05 +0100 [thread overview]
Message-ID: <15000.1041954785@finches.logica.co.uk> (raw)
The yodl documentation for zmv doesn't mention the -W option so this
patch adds that and a completion for it.
Oliver
Index: Completion/Zsh/Command/_zmv
===================================================================
RCS file: Completion/Zsh/Command/_zmv
diff -N Completion/Zsh/Command/_zmv
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Completion/Zsh/Command/_zmv 7 Jan 2003 15:45:33 -0000
@@ -0,0 +1,21 @@
+#compdef zmv zln zcp
+
+_arguments -s -S -A '-*' \
+ '(-C -L -s -p)-M[force mv]' \
+ '(-M -L -s -p)-C[force cp]' \
+ '(-M -C -p)-L[force ln]' \
+ '-f[force overwriting of destination files]' \
+ '-i[interactive: prompt for each operation]' \
+ '-n[no execution: just print what would happen]' \
+ '-Q[force bare glob qualifiers on]' \
+ '(-C -M)-s[symbolic, passed down to ln]' \
+ '-v[verbose: print line as it is executed]' \
+ '-o[specify options to pass to underlying command]: opt string' \
+ '(-M -C -L -s)-p+[specify program to run instead of cp, ln or mv]:program:_command_names -e' \
+ '(-W)-w[implicitly add parenthesis to wildcards in the pattern]' \
+ '(-w)-W[like -w, but turn wildcards in replacement patterns into references]' \
+ '1:source pattern:_files' \
+ '2:desination pattern:_files'
+
+
+
Index: Doc/Zsh/contrib.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/contrib.yo,v
retrieving revision 1.22
diff -u -r1.22 contrib.yo
--- Doc/Zsh/contrib.yo 5 Aug 2002 12:33:27 -0000 1.22
+++ Doc/Zsh/contrib.yo 7 Jan 2003 15:45:33 -0000
@@ -961,8 +961,8 @@
)
findex(zcp)
findex(zln)
-xitem(tt(zcp) [ tt(-finqQvw) ] var(srcpat) var(dest))
-item(tt(zln) [ tt(-finqQsvw) ] var(srcpat) var(dest))(
+xitem(tt(zcp) [ tt(-finqQvwW) ] var(srcpat) var(dest))
+item(tt(zln) [ tt(-finqQsvwW) ] var(srcpat) var(dest))(
Same as tt(zmv -C) and tt(zmv -L), respectively. These functions do not
appear in the zsh distribution, but can be created by linking tt(zmv) to
the names tt(zcp) and tt(zln) in some directory in your tt(fpath).
@@ -973,7 +973,7 @@
ifnzman((noderef(Utilities))).
)
findex(zmv)
-item(tt(zmv) [ tt(-finqQsvw) ] [ -C | -L | -M | -p var(program) ] [ -o var(optstring) ] var(srcpat) var(dest) )(
+item(tt(zmv) [ tt(-finqQsvwW) ] [ -C | -L | -M | -p var(program) ] [ -o var(optstring) ] var(srcpat) var(dest) )(
Move (usually, rename) files matching the pattern var(srcpat) to
corresponding files having names of the form given by var(dest), where
var(srcpat) contains parentheses surrounding patterns which will be
@@ -1008,6 +1008,8 @@
sitem(tt(-v))(Verbose: print each command as it's being executed.)
sitem(tt(-w))(Pick out wildcard parts of the pattern, as described above,
and implicitly add parentheses for referring to them.)
+sitem(tt(-W))(Just like tt(-w), with the addition of turning wildcards in
+the replacement pattern into sequential ${1} .. ${N} references.)
sxitem(tt(-C))
sxitem(tt(-L))
sitem(tt(-M))(Force tt(cp), tt(ln) or tt(mv), respectively, regardless of
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
reply other threads:[~2003-01-07 15:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15000.1041954785@finches.logica.co.uk \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).