1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-29 17:31:02 +01:00

32136: fix problem with kshglob.

Non-pattern characters that could be followed by "(" to introduce
a ksh glob but weren't caused failures.
This commit is contained in:
Peter Stephenson 2013-12-16 22:20:06 +00:00
parent f06851f50d
commit db23c63005
4 changed files with 46 additions and 5 deletions

View file

@ -499,3 +499,30 @@
)
0:No error with empty null glob with (N).
>
(setopt kshglob
test_array=(
'+fours' '+*'
'@titude' '@*'
'!bang' '!*'
# and check they work in the real kshglob cases too...
'+bus+bus' '+(+bus|-car)'
'@sinhats' '@(@sinhats|wrensinfens)'
'!kerror' '!(!somethingelse)'
# and these don't match, to be sure
'+more' '+(+less)'
'@all@all' '@(@all)'
'!goesitall' '!(!goesitall)'
)
for str pat in $test_array; do
eval "[[ $str = $pat ]]" && print "$str matches $pat"
done
true
)
0:kshglob option does not break +, @, ! without following open parenthesis
>+fours matches +*
>@titude matches @*
>!bang matches !*
>+bus+bus matches +(+bus|-car)
>@sinhats matches @(@sinhats|wrensinfens)
>!kerror matches !(!somethingelse)