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

Re: bug with empty path



Peter Stephenson wrote:
> I see the point, but do you really want to try and explain this to the
> average user?  ``The PATH is sometimes empty, and sometimes really empty,
> but only if you set it as an array; if it looks empty, it may be empty
> or really empty; if it's empty but not really empty it pretends to be
> set to the current directory...''

I tell the user that path is an array and the real thing is the path
variable.  PATH just tries to represent is as a scalar for compatibility
reasons.

> Still, there's some confusion in having both $path and $PATH which is
> probably unavoidable, so I can live with it.

When zsh is called as sh, there is no path just PATH.

And if we modify the behaviour of path we should also modify the other
variables: mailpath, fpath, module_path or any other array/scalar pairs.
But that would just remove functionality with cost of addig extra code.

Zoltan



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