Fix shellenv INFOPATH missing the default in fish - #23059
Conversation
Previously, this would generate a single-element array ('/opt/homebrew/share/info'), meaning that emacs and co wouldn't look up their own built-in info dirs.
INFOPATH ought to include a trailing colon to allow this, so we now generate a two-element array in fish ('/opt/homebrew/share/info','')
There was a problem hiding this comment.
Pull request overview
This PR updates brew shellenv’s fish-shell output to ensure INFOPATH preserves the default Info search directories (by ensuring a trailing : semantics via an empty list element), addressing cases where tools like Emacs won’t search their built-in Info dirs.
Changes:
- Document the intended
INFOPATHtrailing-colon behavior. - Update fish
shellenvoutput to initializeINFOPATHso an empty element can be preserved when prepending Homebrew’s Info dir.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Please look at the copilot comments.
|
The comments didn't seem correct to me at first glance, but I'm away at the moment. Will take a closer look in a week or so |
|
Passing on this. Please reopen the PR when you can be more responsive. |
|
I responded to Copilot's comments an hour ago |
|
@jdelStrother You opened the PR two weeks ago, responded to some comments today and said you'll take a look in a week or two. This level of delay in back and forth is very inefficient for everyone involved, sorry. |
|
Sorry, I didn't realize it was necessary to reply to Copilot - I assumed a maintainer would say "yes I agree with the LLM, do this", or "no, this LLM is garbage, ignore it". I was available for 7 days after I initially posted, then went out of the country for 7 days, during which time you asked me to take a look at the Copilot comments. I'm now back and can be more responsive. |
|
@jdelStrother Ok, let's try this again. Please explain here with step-by-step instructions on how to reliably reproduce the bug and what the alternatives you've considered are to this PR's approach. One of the Copilot reviews can be ignored but the other is worth verifying. |
Launch
(note that it's got info paths from straight packages and homebrew, but is missing emacs own built-in info paths)
(now it has info paths from both packages and emacs built-in paths)
(now it has info paths from packages, emacs built-in paths, AND homebrew)
Ehh, nothing great. I'm currently working around by nuking homebrew's bad INFOPATH in my own dotfiles: /opt/homebrew/bin/brew shellenv | source
set --erase INFOPATH |
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Thanks for explaining! Let's give this a go.
Previously,
brew shellenvin fish would generate a single-element array('/opt/homebrew/share/info'), meaning that emacs and co wouldn't look up their own built-in info dirs. INFOPATH ought to include a trailing colon to allow this, so we now generate a two-element array in fish('/opt/homebrew/share/info','')brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Claude fable helped me narrow down why emacs was behaving weird. The code change is me.