From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10540 invoked from network); 17 Jul 2000 13:35:36 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Jul 2000 13:35:36 -0000 Received: (qmail 20945 invoked by alias); 17 Jul 2000 13:35:11 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3290 Received: (qmail 20938 invoked from network); 17 Jul 2000 13:35:11 -0000 Date: Mon, 17 Jul 2000 14:35:08 +0100 From: Adam Spiers To: zsh users mailing list Subject: typeset within functions Message-ID: <20000717143508.A4807@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh users mailing list Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i X-Home-Page: http://www.new.ox.ac.uk/~adam/ X-OS: RedHat Linux Hi all, I want to be able to dump a variable's value to a file from within a function. The typeset built-in would be ideal, because it handles different types of variables (strings, arrays ...); however it doesn't work: % foo=(a b c) % typeset foo foo=(a b c) % foo () { typeset foo } % foo I notice compdump does it the hard way, but then compdump knows the type of each of the variables it is dumping. Is there any way of doing this, short of using ${(t)...} ? Adam