diff options
-rwxr-xr-x | man-list | 21 |
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}" |