[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: man page with standard gnome options

Colin Watson <cjwatson@debian.org> writes:

> On Mon, Oct 21, 2002 at 07:59:44PM +0200, Ralf Treinen wrote:
> > On Mon, Oct 21, 2002 at 11:22:50AM +0100, Colin Watson wrote:
> > > There doesn't *have* to be a bijective mapping from {/bin,/usr/bin} to
> > > /usr/share/man/man1; it merely ought to be injective. :-)
> > 
> > Injective would mean that two different commands must not have the same
> > man page. Why shouldn't that be allowed?
> Erm, possibly my terminology is broken in an attempt to be fancy. Oh
> well. What I mean is that everything in {/bin,/usr/bin} ought to have a
> man page, but it doesn't matter if things in /usr/share/man/man1 aren't
> associated with one single command.

It is injective but that would not really be enough. The manpage for
"egg" should not be called "spam.1.gz", otherwise the man program would
have some trouble finding it. On the other hand, "spam.1.gz" could be a
symlink to "egg.1.gz". Ignoring this subtle issue of symlinks, we
would rather have a mapping f from files in /bin and /usr/bin which is
exactly the output of the following shell function.

        f(){ echo /usr/share/man/man1/$(basename $1).1.gz; }

Of course one could replace this by 

        f(){ echo /usr/share/man/man1/$(basename $1|rot13).1.gz; }

which would retain injectivity and everything. It would however be
slightly inconvenient for users to type "man fu" when they want to see
the manpage of their shell...


P.S.: The issue of symlinks touches on that deep philosophical
question of identity and difference which somehow seems beyond the
scope of this little email...

Reply to: