Discoveries: Tools

w3m

2026-04-05: Man pages as HTML in terminal

man -Hcat renders man pages as HTML. Pipe to w3m for hyperlinks, proper tables, and clickable section navigation:

man -Hcat journalctl | w3m -T text/html

Better than the default pager for deep reading sessions. Section headers become navigation links. Tables render correctly.

Worklog: WRKLOG-2026-04-05


2026-04-05: Kitty inline image support

w3m on kitty renders inline images in the terminal. Antora pages with D2/Kroki diagrams display visually:

# Verify image support compiled in
w3m -version | grep image
# Should show: image in options list

Worklog: WRKLOG-2026-04-05


2026-04-05: Reading local HTML documentation

The bashref and other HTML docs in /usr/share/doc/ render well in w3m. No browser needed:

w3m /usr/share/doc/bash/bashref.html
w3m /usr/share/doc/kitty/html/conf.html
w3m /usr/share/doc/lua/manual.html
w3m /usr/share/doc/Linux-PAM/Linux-PAM_SAG.html

Worklog: WRKLOG-2026-04-05


2026-04-05: Navigation keys

Key Action

Space / b

Page down / up

Tab

Jump to next link

Enter

Follow link

B

Back

/

Search

n / N

Next / previous match

H

Help

q

Quit

Worklog: WRKLOG-2026-04-05

find

2026-04-05: sh -c with _ {} pattern for multi-command execution

Pass find results into shell logic using sh -c. The _ is a placeholder for $0 (script name), {} becomes $1:

find . -type d -name 'claude' -exec sh -c 'echo "=== $1 ===" && ls -1 "$1"' _ {} \;

This pattern lets you run multiple commands per result — echo + ls in this case. Without sh -c, you’re limited to one command per -exec.

Worklog: WRKLOG-2026-04-05


2026-04-05: Directory search with path filtering

Combine -type d with -path to scope directory searches:

# Find claude directories only under examples/
find . -type d -name claude -path '*/examples/*'

# Find all directories named 'claude' with numbered output
find . -type d -name 'claude' | awk '{print NR": "$0}'

Worklog: WRKLOG-2026-04-05


2026-04-05: Find + awk for content search across directories

Search for patterns inside files found by find, with filename context:

find . -type f -name "*.md" -exec awk '/^## Role:/{print FILENAME": "$0}' {} +

The + terminator batches files into fewer awk invocations (faster than \;).

Worklog: WRKLOG-2026-04-05

man

2026-04-05: Filter man pages by section

man -k searches descriptions. Pipe through grep to filter by section number:

# Section 7 only (conceptual docs)
man -k '^git' | grep '(7)' | sort

# Section 5 only (config file formats)
man -k '^git' | grep '(5)' | sort

# Count all pages for a tool
man -k '^git' | awk '{print $1}' | sort -u | wc -l

Git has 241 man pages. 17 are section 7 (conceptual) — these replace the missing HTML user manual on Arch.

Worklog: WRKLOG-2026-04-05


2026-04-05: Section 5 is config file formats

Man section 5 documents config file syntax. Most people only use section 1 (commands) and 8 (admin):

man 5 sudoers        # /etc/sudoers format
man 5 sshd_config    # SSH server config
man 5 journald.conf  # Journal config
man 5 passwd         # /etc/passwd file format (not the command)
man 5 fstab          # Filesystem table

540 section 5 pages on Arch. Most engineers guess at config syntax instead of reading these.

Worklog: WRKLOG-2026-04-05


2026-04-05: man -Hcat for HTML rendering

Render man pages as HTML and pipe to w3m for hyperlinked navigation:

man -Hcat journalctl | w3m -T text/html

Section headers become clickable links. Tables render properly. Far superior to less/bat for deep reading.

Worklog: WRKLOG-2026-04-05

pacman

2026-04-05: Search for doc companion packages

Some Arch packages split docs into separate packages. Search with regex anchoring:

pacman -Ss '^git' | grep -i doc

On Arch, git-doc does NOT exist — the HTML user manual referenced in man git is a Debian/Fedora path. The 241 man pages are all you get.

Worklog: WRKLOG-2026-04-05


2026-04-05: Show optional dependencies

Packages list optional deps that include documentation:

pacman -Qi git | awk '/Optional Deps/,/^$/'

Useful for discovering what a package considers "extra" — often includes docs, shell completions, or integration packages.

Worklog: WRKLOG-2026-04-05


2026-04-05: List all files a package installed

Find everything a package put on your system — docs, examples, configs:

pacman -Ql systemd | grep -E 'doc|example|share'

Worklog: WRKLOG-2026-04-05


2026-04-05: Who owns this file?

Reverse lookup — find which package installed a specific file:

pacman -Qo /usr/share/doc/kitty/html/conf.html

Worklog: WRKLOG-2026-04-05


2026-04-05: Search ALL packages for a file (even uninstalled)

Search the package database for files you don’t have yet:

pacman -Fi journalctl

Requires pacman -Fy to sync the file database first.

Worklog: WRKLOG-2026-04-05

git

2026-04-05: 241 man pages on Arch

Git ships 241 man pages. Most people use 5-10 of them:

man -k '^git' | awk '{print $1}' | sort -u | wc -l

Worklog: WRKLOG-2026-04-05


2026-04-05: Section 7 = the missing user manual

Arch doesn’t package git-doc (the HTML user manual). But the 17 section 7 pages ARE the user manual, split up:

man -k '^git' | grep '(7)' | sort

Key pages: gitdatamodel(7) (how git stores objects), gitrevisions(7) (HEAD~3, @{upstream}, A..B vs A…​B), gitworkflows(7) (branching strategies), gitcore-tutorial(7) (plumbing commands).

Worklog: WRKLOG-2026-04-05


2026-04-05: /usr/share/doc/git-doc/ does not exist on Arch

The man git page references /usr/share/doc/git-doc/user-manual.html — these paths are upstream (Debian/Fedora). On Arch, they don’t exist and there’s no git-doc package to install:

pacman -Ss '^git' | grep -i doc
# Returns nothing useful

Use the section 7 man pages instead. Same content, different access method.

Worklog: WRKLOG-2026-04-05