Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Show (Unix) Manual table of contents

License

NotificationsYou must be signed in to change notification settings

HubTou/mtoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pip installpnu-mtoc

MTOC(1)

NAME

mtoc - show Manual table of contents

SYNOPSIS

mtoc[-f|--file|--whatis FILE][-n|--no MACROS][-t|--type][--Dq][--Pa|--PaSq][--PaDq][--Xr][--debug][--help|-?][--version][--][SECTION ...]

DESCRIPTION

Themtoc utility shows theManual table of contents.

Without arguments, it will list the Manual sections listed inman man.

With arguments, it will list the contents of the requested Manual sections inwhatis(1) format.

The display can be a little bit improved over standard whatis format by using the--Dq,--Pa,--PaSq,--PaDq and--Xr options,in order to interpret the correspondingmdoc(7) macros.

It can also be used as a database-less substitute of whatis, by using the-f,--file or--whatis options on a Manual page's pathname.

It is possible to discardman(7)ormdoc(7) pagesby using the-n or--no options with aman ormdoc parameter.

The-t or--type options will add the type of man page after a pipe character: man, mdoc, other, so(X):{man, mdoc, other},with X indicating the number of redirections (more than 3 will cause an error in order to prevent loops).

The-f and-n options can be used multiple times.

OPTIONS

OptionsUse
-f|--file|--whatis FILEProcess a specific file, like whatis(1)
-n|--no MACROSDiscard man or mdoc macros
-t|--typePrint type of man page (ie. man, mdoc, other, so)
--DqInterpret .Dq (double quotes) macros
--Pa|--PaSqInterpret .Pa (path) macros as single quoted strings
--PaDqInterpret .Pa (path) macros as double quoted strings
--XrInterpret .Xr (cross reference) macros
--debugEnable debug mode
--help|-?Print usage and a short help message and exit
--versionPrint version and exit
--Options processing terminator

ENVIRONMENT

TheMTOC_DEBUG environment variable can also be set to any value to enable debug mode.

Themtoc utility uses theMANPATH environment variable to find man pages.It provides default values both for Unix-like and Windows operating systems.

Locale man pages can be processed if the path where they are stored is added toMANPATH.

Under Windows, the command can use theAPPDATA,HOMEPATH andUSERPROFILE environment variables to find man pages.

EXIT STATUS

Themtoc utility exits 0 on success, and >0 if an error occurs.

SEE ALSO

man(1),whatis(1),apropos(1),man(7),mandoc_char(7),mdoc(7),roff(7)

STANDARDS

Themtoc utility is not a standard UNIX command.

It tries to follow thePEP 8 style guide forPython code.

PORTABILITY

Tested OK under Windows.

HISTORY

This utility was made forThe PNU project in order to explore providing a Manual under non-Unix operating systems.This turned out to be way more complex than anticipated, forcing me to delve much more deeply inroff(7) macros than originally intended!

Check this excellentHistory of UNIX Manpages.

LICENSE

This utility is available under the3-clause BSD license.

AUTHORS

Hubert Tournier

CAVEATS

The order of names in a man page is sorted alphabetically, which sometimes differ from whatis(1) output.I couldn't find the logic behind whatis behaviour...

It isn't currently possible to process:

  • architecture-dependent man pages (for example, in /usr/share/man/man[48]/{aarch64, amd64, arm, i386, powerpc})
  • already uncompressed man pages (for example, in /usr/share/man/cat[1-9])

[8]ページ先頭

©2009-2025 Movatter.jp