zsh-users
 help / color / mirror / code / Atom feed
From: "TJ Luoma" <luomat@gmail.com>
To: "Ray Andrews" <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: environment stuff.
Date: Sat, 29 Nov 2014 22:59:27 -0500	[thread overview]
Message-ID: <9F01E70D-DE8A-46C3-806E-757D6A066E79@gmail.com> (raw)
In-Reply-To: <5479F288.7000508@eastlink.ca>



On 29 Nov 2014, at 11:21, Ray Andrews wrote:

> On 11/29/2014 02:53 AM, Roman Neuhauser wrote:
>
>> typeset -p prints variables that are in scope, not just exported 
>> ones. i can nest several expansions and inspect the results as i add 
>> each layer.
>
> Ah, so a sort of global variable viewer.

Curious. This addresses a question that I recently had.

I thought that `printenv` showed a list of all known variables and their 
values, but I recently realized that it was missing a lot of them.


Q » Is `typeset` what I should use for that? Or is there a better way?


For example, I have sometimes used `printenv > all-vars.txt` to get a 
'snapshot' of current variables. Seems like `typeset > all-vars.txt` is 
much better. I just compared them and `typeset` shows 291 vs `printenv` 
showing 110.

TjL


  reply	other threads:[~2014-11-30  3:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27  1:23 Ray Andrews
2014-11-27  2:03 ` Bart Schaefer
2014-11-27  2:25   ` Ray Andrews
2014-11-27  3:45     ` Bart Schaefer
2014-11-27 22:14       ` Ray Andrews
2014-11-27 23:05         ` Bart Schaefer
2014-11-28 21:58           ` Roman Neuhauser
2014-11-28 22:55             ` Ray Andrews
2014-11-29 10:53               ` Roman Neuhauser
2014-11-29 16:21                 ` Ray Andrews
2014-11-30  3:59                   ` TJ Luoma [this message]
2014-11-30  4:16                     ` Lawrence Velázquez
2014-11-28 23:37             ` Bart Schaefer
2014-11-29  9:35               ` Roman Neuhauser

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=9F01E70D-DE8A-46C3-806E-757D6A066E79@gmail.com \
    --to=luomat@gmail.com \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /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).