about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-01-12 17:00:34 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2016-01-12 17:00:34 +0100
commitdf18374ab6c64ccf6eeeb361238c5f08935076fa (patch)
tree8cdaa8c39ae913938e2aad89d36a3aa31871b3e6
parentca84d5f189ff6105fe9bd7fbc3890b862db2d460 (diff)
downloadxtools-df18374ab6c64ccf6eeeb361238c5f08935076fa.tar.gz
xtools-df18374ab6c64ccf6eeeb361238c5f08935076fa.tar.xz
xtools-df18374ab6c64ccf6eeeb361238c5f08935076fa.zip
xmandoc: strip version to show current manpage. v0.35
-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