diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2012-04-22 18:10:42 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2012-04-22 18:10:42 +0000 |
commit | 5eb53bf88d3153510f0a5304e921b46419fe5721 (patch) | |
tree | 944578b22dcca9b8a6d3e1b211dfd04386ced7a6 /Test | |
parent | 19fe2dcc03d6f3c418e738061e46d0ae013c2550 (diff) | |
download | zsh-5eb53bf88d3153510f0a5304e921b46419fe5721.tar.gz zsh-5eb53bf88d3153510f0a5304e921b46419fe5721.tar.xz zsh-5eb53bf88d3153510f0a5304e921b46419fe5721.zip |
30431 with typo in _typeset fix:
add ${...:|...} and ${...:*...} operators, as documented
Diffstat (limited to 'Test')
-rw-r--r-- | Test/D04parameter.ztst | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 30e4ba0ab..d5a6a403e 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -169,6 +169,29 @@ >a-string-with-slashes >a-string-with-slashes + args=('one' '#foo' '(bar' "'three'" two) + mod=('#foo' '(bar' "'three'" sir_not_appearing_in_this_film) + print ${args:|mod} + print ${args:*mod} + print "${(@)args:|mod}" + print "${(@)args:*mod}" + args=(two words) + mod=('one word' 'two words') + print "${args:|mod}" + print "${args:*mod}" + scalar='two words' + print ${scalar:|mod} + print ${scalar:*mod} +0:"|" array exclusion and "*" array intersection +>one two +>#foo (bar 'three' +>one two +>#foo (bar 'three' +> +>two words +> +>two words + str1='twocubed' array=(the number of protons in an oxygen nucleus) print $#str1 ${#str1} "$#str1 ${#str1}" $#array ${#array} "$#array ${#array}" |