asdf-vm / asdf-vm/asdf

What is the best practice for making man pages accessible that are installed via asdf?

Open
#263 12 comments 5 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Go
Stars
25.6k
Forks
941
Avg merge
9h 24m
Merged PRs (30d)
3

Description

I've been using asdf for a little while now, and something I have noticed is that certain man pages for certain languages / tools aren't accessible after installing such language, i.e. elixir for example.

Presently I am using asdf v0.4.0 on macOS 10.12.6 and macOS does a little trickery to get the man pages loaded. For one, if a `MANPATH` environment variable is set the paths specified in `/private/etc/man.conf` are no longer searchable.

What does this mean? I.e. if I install the homebrew version of `git` it's manual / man page will become accessible via `man git`. However if I add say `$HOME/.asdf/installs/elixir/1.5.2/man` to an environment variable called `MANPATH` then I can no longer access the man page for git using the command `man git`.

The trivial solution that I have come up with is to symlink the $USER specific man pages for various languages I have installed via asdf to `/usr/local/share/man` which then makes them accessible, and I can run `man elixir` and `man git`.

However when I installed python 3.6.3 via asdf it was intelligent enough to add the man pages from my locally installed python and link them to the proper path. I have no idea how python set this up, is it something specific to python or something specific to the [asdf-python](https://github.com/tuvistavie/asdf-python) version?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the MANPATH behavior described for asdf-installed Elixir and Python on macOS, then inspect the asdf-python link and the relevant asdf installation behavior. Compare how each language exposes its man pages and document a project-wide best practice that preserves existing system man-page lookup.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir, python
Domain
cli
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.