summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorepoch <epoch@thebackupbox.net>2022-10-01 03:51:17 -0500
committerepoch <epoch@thebackupbox.net>2022-10-01 03:51:17 -0500
commit556e02cfd4fe4f208abe254f41bffcf14baed8dc (patch)
tree68f4a263643f48175e383997c2b5c835f179a270
parente99c091e81a784a9175dfd4d5c8322b3f67e4342 (diff)
downloaduritools-556e02cfd4fe4f208abe254f41bffcf14baed8dc.tar.gz
uritools-556e02cfd4fe4f208abe254f41bffcf14baed8dc.zip
man-list was missing for some reason
-rwxr-xr-xman-list21
1 files changed, 21 insertions, 0 deletions
diff --git a/man-list b/man-list
new file mode 100755
index 0000000..6a4f3b2
--- /dev/null
+++ b/man-list
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+# differences between man-db and mandoc apropos(1) make it more
+# difficult to parse
+
+# thanks go to opal
+
+length="$(apropos . \
+ | sed -r -e's/ ?\(/(/' \
+ | sed 's/^/man:/g' \
+ | cut '-d ' -f1 \
+ | tr -c ' \n' '_' \
+ | sort \
+ | tail -n1 \
+ | wc -c)"
+
+apropos . \
+ | sed -r -e's/ ?\(/(/' \
+ | sed 's/^/man:/g' \
+ | tr -s ' ' \
+ | sed 's/ /\t/' \
+ | spacify "${length}"