@nhumrich recently commented on issue #712 that the warning message(s) produced by putting an invalid path in the $PATH variable is confusing. Here's an example:
$ set PATH /arglebargle $PATH
set: Warning: path component /arglebargle may not be valid in PATH.
set: No such file or directory
Their proposal is to emit a warning along these lines:
set: Warning: path component /home/nhumrich/.bin may not be valid in PATH.
reason: No such file or directory (/home/nhumrich/.bin)
While I think mentioning the path twice is suboptimal I definitely agree that we can and should provide a clearer diagnostic message. I'd like to see a few proposals and up-votes for a specific proposal before we change this.
How about $PATH component /home/nhumrich/.bin does not seem to exist
(or "is not readable" or "is not a directory" if that's the case)?
Most helpful comment
How about
$PATH component /home/nhumrich/.bin does not seem to exist
(or "is not readable" or "is not a directory" if that's the case)?