From 556e02cfd4fe4f208abe254f41bffcf14baed8dc Mon Sep 17 00:00:00 2001 From: epoch Date: Sat, 1 Oct 2022 03:51:17 -0500 Subject: man-list was missing for some reason --- man-list | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 man-list 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}" -- cgit v1.2.3