Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: path PATH
On Sat, Jan 21, 2023 at 5:54 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> On 2023-01-21 08:38, Roman Perepelitsa wrote:
> > `typeset -p PATH` does show the precise and accurate value of PATH.
>
> 3 /aWorking/Zsh/Source/Wk 1 $ set | grep "^PATH"
> PATH=.:/aWorking/Zsh/System:/aWorking/Bin:/usr/local/bin:/usr/sbin:/usr/bin
>
> 3 /aWorking/Zsh/Source/Wk 1 $ typeset -p PATH
> export -T PATH path=( . /aWorking/Zsh/System /aWorking/Bin
> /usr/local/bin /usr/sbin /usr/bin )
Can you elaborate? Do you believe that these two commands should have
identical output?
Does it bother you that in the following snippet the last two commands
also don't have identical output?
% export -i8 BAR=42
% typeset -p BAR
export -i8 BAR=42
% env | grep BAR
BAR=8#52
These are different commands and they have different output. Neither
shows the "true" or "real" value of the parameter. `typeset -p` shows
exactly and precisely what a zsh parameter is, while `env` shows the
environment.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author