1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-22 16:20:23 +02:00

Fix retying variables in opposite order.

Now gives an error.
Add test.
This commit is contained in:
Peter Stephenson 2015-08-09 19:10:01 +01:00
parent 249999cfb4
commit 17d52d69ec
3 changed files with 11 additions and 1 deletions

View file

@ -1069,6 +1069,11 @@
>a:b a b
>x:y:z
typeset -T tied1 tied2 +
typeset -T tied2 tied1 +
1:Attempts to swap tied variables are safe but futile
?(eval):typeset:2: already tied as non-scalar: tied2
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]]