-
Notifications
You must be signed in to change notification settings - Fork 617
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
What manual page do you want? #1227
Comments
Direnv itself doesn't do anything with manpages. What is the content of the |
How do you explain this?
% file $(which direnv)
/opt/homebrew/bin/direnv: Mach-O 64-bit executable arm64
% strings $(which direnv) | grep MANPA
# Usage: MANPATH_add <path>
# Prepends a path to the MANPATH environment variable while making sure that
# If MANPATH is not empty, man will only look in MANPATH.
# So if we set MANPATH=$path, man will only look in $path.
MANPATH_add() {
local old_paths="${MANPATH:-$(man -w)}"
export "MANPATH=$dir:$old_paths"
# MANPATH
MANPATH_add "$REPLY/man"
MANPATH_add "$REPLY/share/man"
% direnv --version
2.33.0
…On Tuesday, 9 January 2024 at 18:46, Jonas Chevalier ***@***.***> wrote:
Direnv itself doesn't do anything with manpages. What is the content of the `.envrc`?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.[https://mail.proton.me/api/core/v4/images?Url=https%3A%2F%2Fgithub.com%2Fnotifications%2Fbeacon%2FAARU5FHDODEV37JNJLDAYR3YNT7VLA5CNFSM6AAAAABBSUBIF6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTQG2YJI.gif&DryRun=0&UID=edaf2vn4yfjjtcckf6eojqkmheddfgvb]
|
I thought I pretty much explained it all in detail in my initial submission, but here is the function which is included in
This needs to be os-specific, for those cases where MANPATH is not set and I know I can just set MANPATH to something, and it will go away, but I opened the issue on behalf of other folks who might be perplexed by the "What manual page do you want?" message every time. If you wish to ensure on osx the
Found this:
It seems that setting MANPATH is sufficient. It appears to not be necessary to retain the system There is some weird stuff happening here:
|
Sorry for those annoying prompt strings, but I included them for the
This explains it:
My guess is that on
As in:
|
FWIW, here is the
|
Seems like #1161 is describing roughly the same problem on FreeBSD |
I couldn't take a much time to identify the exact cause, but after updating to 2.34.0, the DeprecationWarning was resolved. |
Describe the bug
Activating a direnv asks me which man page I wanted.
To Reproduce
cd somewhere/where/direnv/will/activate
Expected behavior
Not to be bothered about manual page reading.
Environment
macos 14.2.1
zsh
direnv: 2.33.0
Additional context
The problem is that
man -w
is run ifMANPATH
is not set.The text was updated successfully, but these errors were encountered: