New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force use of macOS's builtin manpath
#9817
Conversation
Prevent a useless warning msg if Homebrew's `man-db` is installed and configured
Thanks for the fix (and the description of what is going on). Have you fully considered whether or not the second-order ramifications of this change are necessarily intended? Usually not using a fully specified path to a binary lets a user shim/replace the executable (and the behavior) with a replacement installed to a To be clearer, the options I see would be a) what you did, putting in more effort to try and use the explicit system-provided binary, |
I guess I should have been less terse and explained more of my thinking. As you might have guessed from the fact that I noticed this problem at all, I am one of those users who replaces executables in my Your option (b) was the first thing I considered, but because I don't know every error I didn't consider option (c) because the need for this particular workaround seems to be macOS switching to a read-only And I don't think this is a case of the Given no options or arguments, macOS's The larger consideration is what happens when diff >/dev/null (/usr/local/bin/manpath 2>/dev/null | psub) (/usr/bin/manpath | psub); and echo same
#=> same
set --erase --global MANPATH
diff >/dev/null (/usr/local/bin/manpath 2>/dev/null | psub) (/usr/bin/manpath | psub); or echo nope
#=> nope I also considered your implicit question, "If the user prefers a third-party binary, shouldn't we let them use it?" My conclusion ("No, we shouldn't") was based on two assumptions. First, allowing arbitrary user configuration to influence the behaviour of an undocumented internal fish function which does most of its work in a detached background process and only runs once a week sounds, to me anyway, like a potential nightmare to support. It was certainly a pain for me to diagnose. Second, speaking as one of those Anyway! I hope that makes my line of thinking a little clearer. Feel free to discard this PR if you don't agree. I'd prefer not to maintain my own copy of |
Another option here is to pass (As for special-casing |
I can't believe I didn't notice
—is a good point in favour of the absolute-path approach. |
Ok, I can accept this line of reasoning. Merged w/ thanks. |
Description
This PR modifies
__fish_apropos
to call macOS's own/usr/bin/manpath
directly.Fixes an issue (which I didn't bother reporting separately) where, if the user has installed and configured the
man-db
package from Homebrew,/usr/local/bin/manpath
will complain every time__fish_apropos
runs:The
>/dev/null 2>&1
later on line 43 doesn't suppress the message because of the subshell, I guess? Anyway, this prevents the needless warning and ensures more predictable behaviour.TODOs: