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

Re: "typeset -p" inconsistency




On 2022-11-02 10:04, Bart Schaefer wrote:

Of course it does.

% set | grep -wi path
PATH=/opt/local/bin:/opt/local/sbin:/Users/schaefer/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11/bin:/Library/PostgreSQL/8.3/bin:/Developer/usr/bin
path=( /opt/local/bin /opt/local/sbin /Users/schaefer/bin
/usr/local/bin /usr/bin /bin /sbin /usr/sbin /usr/X11/bin
/Library/PostgreSQL/8.3/bin /Developer/usr/bin )

Different tho, they have different cases and there is that '-T' issue which is a complication perhaps better left as it is.  Only typeset gives us that '-g -aT' duplication.  Mind, typeset does deal with that elegantly:


2 /aWorking/Zsh/Source/Wk 0 $ typeset -mp "(#i)path"
typeset -aT PATH path=( . /aWorking/Zsh/System /aWorking/Bin /usr/local/bin /usr/sbin /usr/bin ) export -T PATH path=( . /aWorking/Zsh/System /aWorking/Bin /usr/local/bin /usr/sbin /usr/bin )

... now that I understand it, I can see that 'PATH path' is just how it needs to be displayed.  But not twice please and of course you can add the '-g' if from within a function.  Nope, it's just not very friendly.  I'm right about this.






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