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

Re: path PATH




On 2023-01-22 08:15, Bart Schaefer wrote:
This is exactly what I suggested in zsh-users/28317 last November,
except I wrote it as a one-liner using the $parameters variable.

It can take a while for things to sink in.  One has to be ready. There are times when some question or some mistake of mine leads to a tsunami of fixes, cascading mental adjustments -- mistakes within mistakes, new ideas, re-thinks -- a whole lot of dominos fall over and I can't stand them all back up again in one go.


The operating system defines the environment as an array ("C"
language) of strings; you can't nest the arrays.  The way an array is
represented in the environment is by convention to separate the
elements with colons.

I just love these deep insights.  So this drills right down to a C limitation!  Or should I say an OS limitation?  C would permit a structure even if Linux won't countenance it.  Mind, it's the sort of thing that's so deep in the bedrock that a change is hardly possible.  Your answer cures  me of any whinyness -- not zsh's issue.  Death and taxes and no arrays in the environment, get used to it.  But now I finally get the point of those colons, it seemed dumb -- PATH is 'naturally' an array.  So we have $path :-) And I can confidently extrapolate that path is created from PATH, not visa versa, yes?  (Cuz a given shell can only 'inherit' PATH, thus the friendlier path must be the derivative.)






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