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

Re: path PATH



On 2023-01-22 11:20, Bart Schaefer wrote:

I'm curious why you chose to do this?  The "hide" attribute means that
a local does not preserve semantics of a special global, not that it's
name is invisible.

I was just about to ask that.  There's a lot to learn from Roman's code but in an experimental frame of mind I have it boiled down to:

    set -- "$@" ${(Pt)1}
    print -rn -- "$2 ${(q-)1}"
# Seems unneeded:
#    set -- "$@" ${(M)2:#(array|association)(|-*)}
    print -r -- " = ${3:+( }${(j: :)${(@qqq)${(@kv)${(@P)1}}}}${3:+ )}"

... I'm completely new to this overwriting of '@', it works but it will take a while to assimilate.  Never seen anything like it before.  Don't know what to make of it.

I'll be interested in Roman's response to your further points before I grab the final edit.  Oh, and my last line above, that blows my breakers, I don't have a prayer of understanding it right now.  4 levels of nesting?






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