about summary refs log tree commit diff
path: root/xmandoc
blob: 126110881826bd90f37bc89dced1e979f1341bb6 (plain) (blame)
1
2
3
4
5
6
7
8
#!/bin/sh
# xmandoc MANPAGE - read manpage of possibly not installed package

xlocate "man/man..\?/$1\.[0-9]" 2>/dev/null | 
	{ grep . || { echo "xmandoc: No entry for $1 found." 1>&2; exit 1; } } |
	while read -r pkg page; do
		xbps-query --cat=$page ${pkg%-*} | mandoc -a
	done