summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xxmandoc4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmandoc b/xmandoc
index 46348f5..1261108 100755
--- a/xmandoc
+++ b/xmandoc
@@ -3,6 +3,6 @@
 
 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
+	while read -r pkg page; do
+		xbps-query --cat=$page ${pkg%-*} | mandoc -a
 	done