- man paru | bat
What do numbers in brackets mean:
PARU(8)
`paru.conf(5), mmakepkg(8),
Also, is there any way to get syntax highlighting when you do something like:
man bat | bat
What do numbers in brackets mean:
PARU(8)
`paru.conf(5), mmakepkg(8),
Also, is there any way to get syntax highlighting when you do something like:
man bat | bat
Isn’t it the page number?
Some commands or other items for which there are man
pages have more than one manual page, depending on what aspect of the manual you wish to consult. You bring up the pertinent page by entering ─ for example ─ the command…
man 2 chmod
Now compare that to the page you get to see when you enter…
man chmod
It is therefore common in UNIX parlance to refer to commands and their man
pages into a single compacted description like, e.g. …
“Use
chmod(2)
to set the SETUID bit on an executable.”“Add a record for the new partition to
fstab(5)
.”
I don’t know ─ I don’t have bat
installed. What does the manual say?
cat settings.json - no colour. | man cat =colour.
I am guessing it’s because of the redirect. I suspect bat
has a problem identifying the file type ─ and thus recognizing the syntax ─ when it receives input from something other than stdin
.
If you just want the manpage to be syntax-highlighted, you can use the most
pager.
After installing most
by yay -S most
, set the env variable MANPAGER
to most
and the manpage should be syntax-highlighted.
$ MANPAGER=$(which most) man man
There is a man on man.
===> man man
The table below shows the section numbers of the manual followed by the types of pages they contain.
1 Executable programs or shell commands 2 System calls (functions provided by the kernel) 3 Library calls (functions within program libraries) 4 Special files (usually found in /dev) 5 File formats and conventions eg /etc/passwd 6 Games 7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7) 8 System administration commands (usually only for root) 9 Kernel routines [Non standard]
Most commands are in 1. If you are writing code, you’d be interested in 3.
The -k
option will search the name and short title and display a list, with the section number.
===> man -k printf
===> man 1 printf
The parts of the man pages.
===> man man-pages
NOTE: There is tab-completion (if installed). So you can type man
TabTab.
man -t bash | ps2pdf - bash.pdf
man --html=firefox bash
man bash | col -b | nano -
cman
and follow arch instructions, then you can invoke man
or cman
. Double check your less
options. A neat way to see what an environmental variables contains: declare -p ${!LE@}
. Any variable that begins with “LE” will be displayed.manarch
. So if I want to see the man pages for bash, I’d type in the firefox address bar manarch bash
.
!archman
.I had to look up what bat
was. When I first saw it, I freaked out a bit and thought about Win batch files Unless you have to use
bat
, I believe the standard utilities will do what you need.
Man pages are organized in sections referred to as numbers e.g. 8 is system management commands.
For example referring to the man page for could look like this pacman-mirrors(8)
which WM?
I’m using plasma with konsole - zsh
the setup looks cool…
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.