diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2020-02-10 13:49:15 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2020-02-10 13:49:15 +0000 |
commit | 743fd1a5d4483427e1ee6b931441657400dd87bf (patch) | |
tree | 6deb707fe7e8cbe5830550fd5fd9715fe179c2ab /man.1 | |
parent | 181a689064792fe61edda70bb2ade55b524dbef8 (diff) | |
download | mandoc-743fd1a5d4483427e1ee6b931441657400dd87bf.tar.gz mandoc-743fd1a5d4483427e1ee6b931441657400dd87bf.tar.zst mandoc-743fd1a5d4483427e1ee6b931441657400dd87bf.zip |
For compatibility with the man(1) implementations of the man-1.6
and man-db packages, print the manpath if the -w option is given
without a following name argument.
This quirk has been in man-1.6 since at least man-1.5e (1998)
and in man-db since 2012.
Using this feature in portable software is a dubious idea because the
internal organization of manual page directories varies in about a
dozen respects among operating systems, so even if you get the answer,
there is no portable way to use it for looking up anything inside.
However, Matej Cepl <mcepl at suse dot cz> made me aware that some
software, for example the manual viewing functionality in the newest
editors/neovim code, unwisely relies on this feature anyway.
No objections were raised when this patch was shown on tech@.
Diffstat (limited to 'man.1')
-rw-r--r-- | man.1 | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,9 +1,9 @@ -.\" $Id: man.1,v 1.36 2020/01/07 11:16:33 schwarze Exp $ +.\" $Id: man.1,v 1.37 2020/02/10 13:49:15 schwarze Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. .\" Copyright (c) 2003, 2007, 2008, 2014 Jason McIntyre <jmc@openbsd.org> -.\" Copyright (c) 2010, 2011, 2014-2018 Ingo Schwarze <schwarze@openbsd.org> +.\" Copyright (c) 2010, 2011, 2014-2020 Ingo Schwarze <schwarze@openbsd.org> .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -31,7 +31,7 @@ .\" .\" @(#)man.1 8.2 (Berkeley) 1/2/94 .\" -.Dd $Mdocdate: January 7 2020 $ +.Dd $Mdocdate: February 10 2020 $ .Dt MAN 1 .Os .Sh NAME @@ -199,6 +199,9 @@ Kernel internals. .It Fl w List the pathnames of all matching manual pages instead of displaying any of them. +If no +.Ar name +is given, list the directories that would be searched. .El .Pp The options |