1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 16:50:58 +01:00

21678: Unsetting tied parameters caused various crashes

This commit is contained in:
Peter Stephenson 2005-08-22 11:43:58 +00:00
parent 50826130a4
commit 2fb1a9f13c
3 changed files with 55 additions and 3 deletions

View file

@ -568,6 +568,40 @@
>0
>/elsewhere /somewhere
local STRING=a:b
typeset -T STRING string
print $STRING $string
unset STRING
set -A string x y z
print $STRING $string
STRING=a:b
typeset -T STRING string
print $STRING $string
unset STRING
set -A string x y z
print $STRING $string
STRING=a:b
typeset -T STRING string
print $STRING $string
unset string
STRING=x:y:z
print $STRING $string
STRING=a:b
typeset -T STRING string
print $STRING $string
unset string
STRING=x:y:z
print $STRING $string
0:Unsetting and recreation of tied normal parameters
>a:b a b
>x y z
>a:b a b
>x y z
>a:b a b
>x:y:z
>a:b a b
>x:y:z
string='look for a match in here'
if [[ ${string%%(#b)(match)*} = "look for a " ]]; then
print $match[1] $mbegin[1] $mend[1] $string[$mbegin[1],$mend[1]]