Skip to content
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

fix: activate breaks man for non-OTP man pages #508

Closed
wants to merge 2 commits into from

Conversation

zardoz03
Copy link

@zardoz03 zardoz03 commented Feb 18, 2024

Description

man by default from what i can tell checks /etc/manpath.config, which then breaks normal usage of man if MANPATH is set without this

fixes #498

  • I have performed a self-review of my changes
    might equally be manpath -g, however manpath, in my case, preserves user paths such as $HOME/.local/share/man
  • I have read and understood the contributing guidelines

man by default from what i can tell checks /etc/manpath.config, which then breaks normal usage of man if MANPATH is set without this
@paulo-ferraz-oliveira
Copy link
Contributor

👋 thanks for the pull request.

Regarding "[?] I have performed a self-review of my changes", I'm not sure the ? is because you don't understand the choice item, but I'll explain:

  • after you pushed your changes, you made sure (in GitHub, since that's what we'll use to review initially) you pushed exactly what you want

@paulo-ferraz-oliveira paulo-ferraz-oliveira changed the title fix MANPATH splatting fix: activate breaks man for non-OTP man pages Feb 18, 2024
@paulo-ferraz-oliveira
Copy link
Contributor

Tests failing...

@paulo-ferraz-oliveira
Copy link
Contributor

Are these changes consistent in the fish and C shell activation scripts?

@paulo-ferraz-oliveira
Copy link
Contributor

manpath -g does not seem to work in macOS, so manpath alone seems like an Ok solution.

@zardoz03
Copy link
Author

zardoz03 commented Feb 18, 2024

i think its because the CI checks the manpath after activation, and now there is the docker state included...

also sorry i neglected the csh/fish activation

@paulo-ferraz-oliveira
Copy link
Contributor

also sorry i neglected the csh/fish activation

No prob. We'd eventually either do it, or, at the very least, identify it as an issue 😄, but since you updated it, it's most welcome.

As per CI you might need to run shellcheck tests/activate_test.sh or maybe update the file as per the CI results and re-push.

@paulo-ferraz-oliveira
Copy link
Contributor

Would it make this all simpler if we:

  1. fetch MANPATH with manpath
  2. update a variable (maybe we don't need to check if it's set or not)
  3. do cleanup upon deactivate

?

I'd need to test this better, maybe I'm missing a detail, but the current implementation seems much more complex than required 😕 @jadeallenx, thoughts?

@jadeallenx
Copy link
Collaborator

Yeah I agree the current situation isn’t great and could be simplified

@zardoz03
Copy link
Author

idk how i'd alter the tests, but the new failures seem to be that the expected_env is presumed to be the same on different calls/users, so it'd have to use something like grep $EXPECTED over the actual MANPATH, rather than literal equality

@paulo-ferraz-oliveira
Copy link
Contributor

idk how i'd alter the tests, but the new failures seem to be that the expected_env is presumed to be the same on different calls/users, so it'd have to use something like grep $EXPECTED over the actual MANPATH, rather than literal equality

You could potentially also validate that it's, as expected, the concatenation you build.

@paulo-ferraz-oliveira
Copy link
Contributor

idk how i'd alter the tests

You mean you don't know where to start, or what to do?

You can look at the tests folder for examples, or run your own, by writing a Bash script (exit with 1 on error, otherwise 0).

@paulo-ferraz-oliveira
Copy link
Contributor

Closing as stale (also, all CI is failing). Feel free to re-open and apply the required changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

activate breaks man for non-OTP man pages
3 participants