Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
typeset within functions
- X-seq: zsh-users 3290
- From: Adam Spiers <adam@xxxxxxxxxx>
- To: zsh users mailing list <zsh-users@xxxxxxxxxxxxxx>
- Subject: typeset within functions
- Date: Mon, 17 Jul 2000 14:35:08 +0100
- Mail-followup-to: zsh users mailing list <zsh-users@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author