zsh-workers
 help / color / mirror / code / Atom feed
* BUG: array splices
@ 1998-12-20  4:48 Phil Pennock
  1999-01-03 20:33 ` PATCH: 3.1.5-pws-4: " Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Pennock @ 1998-12-20  4:48 UTC (permalink / raw)
  To: Zsh Development Workers

This applies to 3.1.5-pws-3 and -pws-4 -- not before that, I think.

./zsh -f
% set a b c d e
% print $*
a b c d e
% print $argv[2,4]
b
%

Basically, for any ${arrayname[start,stop]} zsh now seems to ignore the
comma and everything after it, such that the expression becomes exactly
equivalent to ${arrayname[start]}

An interesting feature.
-- 
--> Phil Pennock ; GAT d- s+:+ a22 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++
E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+
G+ e+ h* r y?


^ permalink raw reply	[flat|nested] 2+ messages in thread

* PATCH: 3.1.5-pws-4: Re: BUG: array splices
  1998-12-20  4:48 BUG: array splices Phil Pennock
@ 1999-01-03 20:33 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 1999-01-03 20:33 UTC (permalink / raw)
  To: Phil Pennock, Zsh Development Workers

Catching up on mail that arrived during my winter vacation ...

On Dec 20,  4:48am, Phil Pennock wrote:
} Subject: BUG: array splices
}
} Basically, for any ${arrayname[start,stop]} zsh now seems to ignore the
} comma and everything after it

Some of the associative array code getting in the way of the old behavior.
This should fix it, and should apply to pws-4.

Index: Src/params.c
===================================================================
--- params.c	1998/12/18 16:09:26	1.19
+++ params.c	1999/01/03 20:24:37
@@ -765,7 +765,7 @@
 	} else if (rev) {
 	    v->isarr |= SCANPM_WANTVALS;
 	}
-	if (!down)
+	if (!down && PM_TYPE(v->pm->flags) == PM_HASHED)
 	    v->isarr &= ~SCANPM_MATCHMANY;
 	*inv = ind;
     }

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-01-03 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-20  4:48 BUG: array splices Phil Pennock
1999-01-03 20:33 ` PATCH: 3.1.5-pws-4: " Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).