about summary refs log tree commit diff
path: root/xmandoc
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-04-15 17:14:32 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-04-15 17:14:32 +0200
commit4d2f25c374947b21b142f244668a5aad2e600ccc (patch)
treee0a86bec47935abac4728fedabe3fc6466f9c88c /xmandoc
parent9d0344bd890960294da068493a1fb44842ca6eaa (diff)
downloadxtools-4d2f25c374947b21b142f244668a5aad2e600ccc.tar.gz
xtools-4d2f25c374947b21b142f244668a5aad2e600ccc.tar.xz
xtools-4d2f25c374947b21b142f244668a5aad2e600ccc.zip
add xmandoc
Diffstat (limited to 'xmandoc')
-rwxr-xr-xxmandoc8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmandoc b/xmandoc
new file mode 100755
index 0000000..7a6486e
--- /dev/null
+++ b/xmandoc
@@ -0,0 +1,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 pkg page; do
+		xbps-query --cat=$page $pkg | mandoc -a
+	done