|
Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
#######
#
# E-scripts on man and manpages.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
# (find-eev-quick-intro)
# http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/man.e>
# or at <http://angg.twu.net/e/man.e.html>.
# See also <http://angg.twu.net/emacs.html>,
# <http://angg.twu.net/.emacs[.html]>,
# <http://angg.twu.net/.zshrc[.html]>,
# <http://angg.twu.net/escripts.html>,
# and <http://angg.twu.net/>.
#
#######
# «.online-man-pages» (to "online-man-pages")
# «.edrx_slash_man» (to "edrx_slash_man")
# «.freebsd_manpages» (to "freebsd_manpages")
# «.manpages-pt» (to "manpages-pt")
# «.man-in-debug-mode» (to "man-in-debug-mode")
https://en.wikipedia.org/wiki/Man_page
https://en.wikipedia.org/wiki/Terminal_pager
#####
#
# online-man-pages
# 2019oct27
#
#####
# «online-man-pages» (to ".online-man-pages")
# http://man.he.net/
# http://man.he.net/?topic=man§ion=all
# http://man.he.net/?topic=pager§ion=all
# http://man.he.net/?topic=man§ion=1
# https://man.cx
# https://man.cx/man
# https://linux.die.net/man/
# https://linux.die.net/man/1/man
# http://man7.org/linux/man-pages/
# https://tldr.sh
#####
#
# setting up ~/man/
# 2005oct27
#
#####
# «edrx_slash_man» (to ".edrx_slash_man")
# (find-man "1 man" "MANPATH")
# (find-man "1 manpath")
# (find-man "5 manpath")
# (find-anggfile ".zshrc.local.cdd" "MANPATH")
# (find-sh "manpath")
# (find-sh "manpath -c")
# (find-fline "/usr/share/man/")
# (find-fline "/var/cache/man/")
# (find-fline "~/usrc/smalltalk-2.1.9/doc/gst.1")
#*
rm -Rv /tmp/myman/
mkdir /tmp/myman/
cd /tmp/myman/
cat > blarfl.1 <<'%%%'
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28.
.TH SMALLTALK "1" "October 2004" "Smalltalk version 2.1.8" "User Commands"
.SH NAME
Smalltalk \- the GNU Smalltalk virtual machine
.SH DESCRIPTION
GNU Smalltalk usage:
.IP
gst [ flag ... ] [ file ...]
.TP
\fB\-a\fR \fB\-\-smalltalk\fR
Pass the remaining arguments to Smalltalk
.PP
Files are loaded one after the other. Etc.
.SH AUTHOR
Written by Foo and Bar.
%%%
man2t blarfl.1 | less
#*
# (find-fline "/usr/share/man/man1/man.1.gz")
/usr/share/man/man1/man.1.gz
# (find-man "
#####
#
# searching the text of all (?) manpages
# 2000jul04
#
#####
# «manglimpse»
# (find-angg ".zshrc" "glimpse")
mkdir /tmp/man/
for i in /usr/man/man? /usr/share/man/man?; do
(cd $i
for i in *; do
echo $i
zcat $i > /tmp/man/$(basename $i .gz)
done)
done
cd /tmp/man/
glimpseindex -H . *
agrep -il Packages *
agrep -il override *
#####
#
# man-db
# 2000sep07
#
#####
# (find-status "man-db")
# (find-vldifile "man-db.list")
# (find-fline "/usr/doc/man-db/")
# One of the most interesting manpages in Debian:
# (eeman "8 accessdb")
# (find-fline "/var/catman/")
#*
strace-to ~/s accessdb |& tail
cat ~/s
#*
# (eeman "1 manpath")
# (eeman "1 manpath" " MANPATH$")
# (find-fline "/etc/manpath.config")
# (find-fline "/etc/manpath.config" "their PATH environment variable")
# (eeman "5 manpath")
#*
echo $MANPATH
manpath
#*
#*
# Ask man to output the steps it's taking, and not call the pager:
strace-to ~/s \
man -d man \
|& tee ~/o
#*
# (find-fline "~/o")
# (find-fline "~/s")
# (find-fline "~/s" "execve(\"/usr/lib/man-db/man\"")
# (find-fline "~/s" "open(\"/etc/manpath.config\"")
# (find-fline "/etc/passwd" "\nman:*:6:")
# (find-fline "/etc/group" "users:*:100:")
# (find-fline "/etc/group" "disk:*:6:")
# (eeman "5 group")
# (find-fline "/gnu/usr/share/man/man4/")
# (find-fline "/gnu/usr/share/man/man7/")
# (find-fline "/gnu/usr/share/man/man8/")
# There was some discussion about MANPATH in debian-mentors, xx/sep/2000.
# TkMan was using its own way to build a MANPATH.
# I have to get a better link to the message...
# (find-fline "$MAIL" "Section 3.9 of the")
# (find-dpolfile "policy.text.gz" "3.9. Environment variables")
# (eeman "zsoelim")
#####
#
# man-db source (potato)
# 2000sep07
#
#####
rm -Rv /usr/src/man-db-2.3.16/
pdsc $SDEBIAN/dists/potato/main/source/doc/man-db_2.3.16-1.dsc
cd /usr/src/man-db-2.3.16/
# (code-c-d "mandb" "/usr/src/man-db-2.3.16/")
# (find-mandbfile "")
# (find-mandbfile "src/")
#####
#
# Reading the FreeBSD manpages from Linux
# 2001may09
#
#####
# «freebsd_manpages» (to ".freebsd_manpages")
# (find-angg ".zshrc" "BSD")
#*
# First we need to prepare a copy of the BSD man-dirs.
# Using the Linux man with the manpath set to the original BSD
# man-dirs could be dangerous, so we copy them to /tmp/bsdman... BTW,
# I usually mount the freebsd partitions read-only from Linux, for
# safety.
#
# (find-fline "/freebsd/etc/manpath.config")
# (eeman "catman")
rm -Rv /var/_freebsdman/
mkdir /var/_freebsdman/
cd /freebsd/
cp -diPpvR usr/share/man usr/share/perl/man /var/_freebsdman/
cd /var/_freebsdman/ \
&& chmod 777 $(find * -type d)
#*
# Note that the first time we run this man will think for a look time
# (~1min) before showing anything; to understand what it is doing
# during this time we can run it with the "-d" switch:
#
# (eeman "man" "--debug")
MANPATH=/var/_freebsdman/usr/share/man:/var/_freebsdman/usr/share/perl/man \
man keyboard
#*
# (find-fline "/var/_freebsdman/usr/share/")
#####
#
# Why some manpages can have accented characters
# 2001nov20
#
#####
# «manpages-pt» (to ".manpages-pt")
# (find-fline "~/TCL/Tcl-pt.n")
#*
pdsc $SDEBIAN/pool/main/m/manpages-pt/manpages-pt_20011020-1.dsc
cd /usr/src/manpages-pt-20011020/
debian/rules binary |& tee odrb
#*
dpkg -i /usr/src/manpages-pt_20011020-1_all.deb
#*
# (find-manptfile "debian/tmp/usr/share/man/pt/man7/")
LC_ALL=pt_BR man 7 glob
#*
LC_ALL=pt_BR man -d 7 glob |& tee ~/o
# (find-fline "~/o" "add_nls_manpath():")
#*
cd /usr/src/manpages-pt-20011020/debian/tmp/usr/share/man/pt/man7/
# zcat glob.7.gz | man2t |& l -S
# zcat glob.7.gz | GROFF_TYPESETTER=latin1 groff -Tascii -man |& l -S
zcat glob.7.gz | GROFF_TYPESETTER=latin1 groff -Tlatin1 -man |& l -S
#*
# (find-htetfile "Portuguese-HOWTO.txt.gz" "6.1.11. Man, groff, troff")
# (find-man "1 manpath")
# (find-man "5 manpath")
# (find-fline "/etc/manpath.config")
# (find-fline "/usr/doc/man-db/man-db-manual.txt.gz" "ISO 8859-1")
# (find-man "3 setlocale")
# (code-c-d "manpt" "/usr/src/manpages-pt-20011020/")
# (find-manptfile "")
# (find-manptfile "debian/")
#####
#
# Running man in debug mode
# 2019may11
#
#####
# «man-in-debug-mode» (to ".man-in-debug-mode")
# (find-es "groff" "manpage_via_groff")
# (find-man "1 man")
# (find-man "1 man" "-d, --debug")
# (find-man "1 man" "filters and the primary formatter")
# (find-man "1 man" "-t, --troff")
# (find-man "1 man" "--warnings[=warnings]\n")
# (find-sh "locate manpath")
# (find-fline-gz "/usr/share/man/man1/manpath.1.gz")
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
export PAGER=cat
man -d manpath
man -d manpath > /dev/null
# (find-sh "man -d manpath > /dev/null")
# (find-sh "man -d manpath > /dev/null" "roff")
# (find-sh "man -d print > /dev/null")
# (find-sh "man -d print > /dev/null |& grep print")
find /var/cache/man | sort
# Local Variables:
# coding: utf-8-unix
# End: