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

Re: Should (t)path = array-unique-special work this way



On Feb 14, 11:04am, Sebastian Gniazdowski wrote:
}
} Wanted to write a snapshot feature, basically declare -p > snapshot;
} setopt typesetsilent; source ./snapshot, but the omission of -U is
} quite a blocker.

This doesn't work in the general case anyway, because the output of
"typeset -p" (aka "declare -p") doesn't properly reflect local scopes.
That is, if you're in a local scope, sourcing the "declare -p" output
will create all the variables at that local scope, not at the scopes
where they were originally defined.

In fact it's impossible to correctly reconstruct the local and global
scopes because of the runtime dynamic scoping rules.



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