Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: environment stuff.



On Nov 29, 2014, at 10:59 PM, TJ Luoma <luomat@xxxxxxxxx> wrote:

> 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.

Not all zsh parameters are exported to the environment. `printenv` only prints those parameters that have been exported. `typeset` prints *all* parameters.

vq


Messages sorted by: Reverse Date, Date, Thread, Author