From f4f0becb633709741253f0b9677fdde60ae87faf Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 9 Feb 2010 17:47:02 +0000 Subject: 27694: add P glob qualifier for prepending --- Doc/Zsh/expn.yo | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Doc/Zsh') 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 -- cgit 1.4.1