fix: man_pages on macOS 13 and FreeBSD #2326 #2352
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In macOS 13 (Ventura),
:Telescope man_pages
shows no results. This is caused by a difference in behavior between the previous implementation ofapropos(1)
up to macOS 12.5 and the newman
package used in macOS 13, which comes from FreeBSD.This new
apropos(1)
is implemented as a shell script and loses the" "
argument through variable expansions. Sinceapropos(1)
expects a regular expression to filter the results of thewhatis
database, passing"."
causes it to not lose the argument and match everything, thus returning all results so they can be filtered within Telescope.In the process of investigating the root cause for the issue on macOS 13, I realized that
:Telescope man_pages
doesn't work in FreeBSD for the same reason. Therefore, I included it in the fix.Fixes #2326
Type of change
How Has This Been Tested?
Test steps:
nvim
(on either macOS 13 or FreeBSD).man_pages
picker with:Telescope man_pages
.Configuration:
Checklist:
I have commented my code, particularly in hard-to-understand areas- not applicableI have made corresponding changes to the documentation (lua annotations)- not applicable