On my machine, I have the latest version of less installed through homebrew.
Around the time me updating to macOS 14, I noticed my man stopped loading less in the latest version. If I run man man and hit V to show the less version, I get less 581.2, which is the system installation of less. But if I export MANPAGER to less, and then re-run the previous steps, I get less 643. If I unexport MANPAGER and open up another man page and run in less ! echo $PATH I see the expected output and that the location of brew installed less ahead of /usr/bin/less. So I can conclude that my PATH is properly passed to man but it's choosing to use /usr/bin/less anyway.
I know I can fix this by just exporting MANPAGER to less, but I never needed this before. This seems really fishy and I'm worried something more pernicious is going on.
Has anyone else run into this problem? What's causing my man to use the system installation of less?
No idea what your
man manprints, but mine does not telllessbutpager, so givenlessis inPATHat the expected location, butpagernot (and if I get your question right), then it could make sense thatPATHappears non-working from the user-facing side, but it is actually the expectation of the command name from the inside that is not matched.So while
lessis used aspagerit ispagernoless.Therefore only changing the
PATHforlessdoes not suffice forman(1)which is looking forpager, whichPATHwas not changed for.Furthermore with your question, and if we're still on the same page, you may want to provide feedback to the homebrew formula authors about your learning and discuss a useful default setting — given
man pageractually showsless(1)on your box.Until then, you could temporarily create a directory entry named
pageras a symbolic link oflessin the same directory that is inPATHof your homebrew'edlessoverride and see if it works. This could also work as your proof of concept for any further discussions with the formulas team since at the end of the day this is a programming question, right? Therefore such or other changes need to be filed upstream.