diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:06:33 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:06:33 +0000 |
commit | a61dc2074ae6cd00f1c166dc0102c491db056060 (patch) | |
tree | b5661a235ec55353b97c617554baf14158c91ea8 /Doc/Zsh/expn.yo | |
parent | 32c2ebbaa5d7927f33ee0ecf98472a71cf902cf3 (diff) | |
download | zsh-a61dc2074ae6cd00f1c166dc0102c491db056060.tar.gz zsh-a61dc2074ae6cd00f1c166dc0102c491db056060.tar.xz zsh-a61dc2074ae6cd00f1c166dc0102c491db056060.zip |
zsh-3.1.5-pws-1 zsh-3.1.5-pws-1
Diffstat (limited to 'Doc/Zsh/expn.yo')
-rw-r--r-- | Doc/Zsh/expn.yo | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo index 99844b42a..f201e4751 100644 --- a/Doc/Zsh/expn.yo +++ b/Doc/Zsh/expn.yo @@ -777,6 +777,9 @@ Matches the enclosed pattern. This is used for grouping. If the tt(KSH_GLOB) option is set, then a `tt(@)', `tt(*)', `tt(+)', `tt(?)' or `tt(!)' immediately preceding the `tt(LPAR())' is treated specially, as detailed below. +Note that grouping cannot currently extend over multiple directories: +a `tt(/)' separating a directory terminates processing of the current +group; processing resumes after the end of the group. ) item(var(x)tt(|)var(y))( Matches either var(x) or var(y). @@ -840,6 +843,43 @@ Match anything but the expression in parentheses. (Like `tt(LPAR()^LPAR())...tt(RPAR()RPAR())'.) ) enditem() +subsect(Globbing Flags) +There are various flags which affect any text to their right up to the +end of the enclosing group or to the end of the pattern; they require +the tt(EXTENDED_GLOB) option. All take the form +tt(LPAR()#)var(X)tt(RPAR()) where var(X) may be one of the following +characters: + +startitem() +item(i)( +Case insensitive: upper or lower case characters in the pattern match +upper or lower case characters. +) +item(l)( +Lower case characters in the pattern match upper or lower case +characters; upper case characters in the pattern still only match +upper case characters. +) +item(I)( +Case sensitive: locally negates the effect of tt(i) or tt(l) from +that point on. +) +enditem() + +For example, the test string tt(fooxx) can be matched by the pattern +tt(LPAR()#i)tt(RPAR()FOOXX), but not by tt(LPAR()#l)tt(RPAR()FOOXX), +tt(LPAR()#i)tt(RPAR()FOO)tt(LPAR()#I)tt(RPAR()XX) or +tt(LPAR()LPAR()#i)tt(RPAR()FOOX)tt(RPAR()X). + +When using the ksh syntax for grouping both tt(KSH_GLOB) and +tt(EXTENDED_GLOB) must be set and the left parenthesis should be +preceded by tt(@). Note also that the flags do not affect letters +inside tt([...]) groups, in other words tt(LPAR()#i)tt(RPAR()[a-z]) +still matches only lowercase letters. Finally, note that when +examining whole paths case-insensitively every directory must be +searched for all files which match, so that a pattern of the form +tt(LPAR()#i)tt(RPAR()/foo/bar/...) is potentially slow. + subsect(Recursive Globbing) A pathname component of the form `tt(LPAR())var(foo)tt(/RPAR()#)' matches a path consisting of zero or more directories |