Skip to content

Fix man proxy in FreeBSD#1725

Merged
kinnison merged 1 commit intorust-lang:masterfrom
tesuji:man
Mar 28, 2019
Merged

Fix man proxy in FreeBSD#1725
kinnison merged 1 commit intorust-lang:masterfrom
tesuji:man

Conversation

@tesuji
Copy link
Copy Markdown
Contributor

@tesuji tesuji commented Mar 24, 2019

In FreeBSD, man command only searches for man files in MANPATH.
Which means that FreeBSD man program does not accept interpret local man files.

On Bash-compatible shell, one could use this command to open rust specific manpages:

env MANPATH=$HOME/.rustup/toolchains/stable-x86_64-unknown-freebsd/share/man man rustc

Locally tested on:

  • Ubuntu
  • FreeBSD 11

r? @kinnison

Note: Ping me if someone needs to squash this PR.

Copy link
Copy Markdown
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good, though I'm loathe to approve because -M overrides the MANPATH environment variable which might also be set and relevant. I'd be more comfortable with manipulating that than passing -M

@tesuji
Copy link
Copy Markdown
Contributor Author

tesuji commented Mar 26, 2019

@kinnison So you want to manipulate MANPATH env var via Command::env?

@kinnison
Copy link
Copy Markdown
Contributor

I figure that if MANPATH is set, we have to do that to be correct (i.e. prepend our path onto MANPATH) If it's not set, we could use -M but at that point the code is simpler to always prepend to MANPATH

@tesuji
Copy link
Copy Markdown
Contributor Author

tesuji commented Mar 27, 2019

@kinnison I pushed the change you requested.

Copy link
Copy Markdown
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable to me. Have you verified it against FreeBSD and at least one Linux?

@kinnison
Copy link
Copy Markdown
Contributor

If so, please rebase to clean up the history of the branch before I merge.

@tesuji
Copy link
Copy Markdown
Contributor Author

tesuji commented Mar 27, 2019

@kinnison I tested on Ubuntu. FreeBSD I only test the equivalent shell command.

Copy link
Copy Markdown
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kinnison kinnison merged commit 291900e into rust-lang:master Mar 28, 2019
@tesuji tesuji deleted the man branch March 28, 2019 09:43
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.

2 participants