zsh-users
 help / color / mirror / code / Atom feed
From: Adam Spiers <adam@spiers.net>
To: zsh users mailing list <zsh-users@sunsite.auc.dk>
Subject: typeset within functions
Date: Mon, 17 Jul 2000 14:35:08 +0100	[thread overview]
Message-ID: <20000717143508.A4807@thelonious.new.ox.ac.uk> (raw)

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


                 reply	other threads:[~2000-07-17 13:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000717143508.A4807@thelonious.new.ox.ac.uk \
    --to=adam@spiers.net \
    --cc=zsh-users@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).