On Feb 12 19:20:05, schwa...@usta.de wrote: > Jan Stary wrote on Thu, Feb 12, 2015 at 02:52:33PM +0100: > > > I have some man pages installed in $HOME/man > > so I augment my manpath like this in my ~/.shrc > > > > test -d $HOME/man && alias man="man -m $HOME/man" > > > > Now man(1) complains saying > > > > $ man ls > > man: -m/home/hans/man: Bad argument > > I fail to reproduce on -current, it works for me.
Hm, I just upgraded to current and it disappeared. > Jan Stary wrote on Thu, Feb 12, 2015 at 05:17:52PM +0100: > > > With man unaliased, it works just fine. > > With 'man -m ~/man', or with man aliased to that, > > 'man ls' gave me the error above. > [...] > > current/amd64 > > How old is that -current, exactly? > As a rough indication, please show the output of "dmesg | head -n2". OpenBSD 5.6-current (GENERIC.MP) #623: Tue Dec 16 00:32:49 MST 2014 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP > If you snapshot is older than > http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/mandoc/main.c#rev1.115 > (December 21, 2014), you are falling prey to a bug reported almost > two months ago by Alessandro de Laurenzis (and fixed back then). Ha, that was probably it then. > John Merriam wrote on Thu, Feb 12, 2015 at 10:15:08AM -0500: > > > I noticed that in the error message there is no space between -m > > and the path. That seems a bit odd. > > It is odd. It is a remnant from the pre-POSIX past. > Traditional roff programs did not use spaces between their > options and option arguments, and that tradition is still > somewhat alive. For example, most people would probably > consider > > groff -mdoc -Tascii -P-c /usr/share/man/man1/ls.1 > > more natural than > > groff -m doc -T ascii -P -c /usr/share/man/man1/ls.1 > > even though both work exactly the same way. The mandoc(1) utility > handles both forms, too. In the documentation, i use the modern > form at some places (for example, see the man(1) manual in -current) > but the traditional form in other places (for example, see the > mandoc(1) manual in -current). I should probably clean that up to > use the modern form everywhere. The error messages all used the > traditional form in the past, but used the modern form now (changed > in the same commit main.c rev. 1.115 mentioned above). > > > Your `test -d $HOME/man && alias man="man -m $HOME/man"` works fine > > for me in ksh when I put it in a .profile on 5.6 -stable. > > Oh, -stable is a completely different beast. While -current is > using the mandoc implementation of man(1), -stable is using the > traditional BSD implementation. I was confused trying to spot my problem in current man.c, thanks for the insight. Jan