about summary refs log tree commit diff
path: root/Doc/Zsh
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-02-09 17:47:02 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-02-09 17:47:02 +0000
commitf4f0becb633709741253f0b9677fdde60ae87faf (patch)
tree66974ba12f74f1762e0ce461cf725a80f5533d4b /Doc/Zsh
parenta13752e2cb20906cae5ced873639b25164f7c85f (diff)
downloadzsh-f4f0becb633709741253f0b9677fdde60ae87faf.tar.gz
zsh-f4f0becb633709741253f0b9677fdde60ae87faf.tar.xz
zsh-f4f0becb633709741253f0b9677fdde60ae87faf.zip
27694: add P glob qualifier for prepending
Diffstat (limited to 'Doc/Zsh')
-rw-r--r--Doc/Zsh/expn.yo12
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index 2578baff4..cff2048f8 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -2296,6 +2296,18 @@ expressions. As in parameter subscripting they may be negative to make
 them count from the last match backward. E.g.: `tt(*(-OL[1,3]))'
 gives a list of the names of the three largest files.
 )
+item(tt(P))(var(string))(
+The var(string) will be prepended to each glob match as a separate
+word.  var(string) is delimited in the same way as arguments to the
+tt(e) glob qualifier described above.  The qualifier can be repeated;
+the words are prepended separately so that the resulting command
+line contains the words in the same order they were given in the
+list of glob qualifiers.
+
+A typical use for this is to prepend an option before all occurrences
+of a file name; for example, the pattern `tt(*(P:-f:))' produces the
+command line arguments `tt(-f) var(file1) tt(-f) var(file2) ...'
+)
 enditem()
 
 More than one of these lists can be combined, separated by commas. The