-
-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
shellenv: prepend colon to MANPATH if set #17633
Conversation
I've not touched Also need help fixing the PowerShell code, which I have no experience with. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gromgit! @Homebrew/maintainers can someone help out with Powershell and review Fish here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and in my understanding this isn't applicable to fish.
7e638f0
to
df5dbac
Compare
@jpawlowski, as the original author of the PowerShell shellenv code, can you advise on the necessary changes (do nothing if MANPATH not set, add colon at start if it is set)? Thanks much! |
The current appended colon means system man pages always shadow Homebrew's. There's also no point adding Homebrew's man dir, nor filling out an empty MANPATH, since `man` and friends will add the necessary dirs according to PATH. Closes Homebrew/homebrew-core#176037. Also fixed a syntax error in the `*csh` INFOPATH setting.
df5dbac
to
4ff3655
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @gromgit! Powershell can be a follow-up.
When MANPATH is not set, this now triggers an unbound variable error in Bash shells with bash -eu -c 'unset MANPATH; eval "$(/opt/homebrew/bin/brew shellenv)"'
bash: line 5: MANPATH: unbound variable Could use e.g. echo "export MANPATH=\${MANPATH+:}:${MANPATH#:}${HOMEBREW_PREFIX}/share/man;" |
The current appended colon means system man pages always shadow Homebrew's. There's also no point adding Homebrew's man dir, nor filling out an empty MANPATH, since
man
and friends will add the necessary dirs according to PATH.Closes Homebrew/homebrew-core#176037.
Also fixed a syntax error in the
*csh
INFOPATH setting.brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?