defunkt/gem-man — Issue #8: follow $MANPATH directory structure
Author: sunaku
Created: 2012-03-06 08:11:04+00:00
State: open

gem-man doesn't follow the standard $MANPATH directory structure (`man/manX/Y.X` where `X` is the section number and `Y` is the manual page) but instead uses a single flattened directory (`man/Y.X`) to keep manual pages from all sections.

This makes it hard to simply add gem `man/` directories (that gem-man looks through) to $MANPATH and to just use `man` thereafter to look up *both* system and gem manuals.

For example, observe how man(1) cannot find `bar.3`, whereas it can find `foo.1`:

```sh
$ mkdir -p man/man1
$ touch man/man1/foo.1
$ touch man/bar.3
$ man -M ./man -a bar
No manual entry for bar
exit 16
$ man -M ./man -a foo
$ tree man
man
├── bar.3
└── man1/
└── foo.1

1 directory, 2 files
```

Thanks for your consideration.