diff --git a/tools/bin/man-table b/tools/bin/man-table index ede9878..ffc0697 100755 --- a/tools/bin/man-table +++ b/tools/bin/man-table @@ -9,21 +9,24 @@ printf "" find man -type f -name '*.[1-9]' | while IFS= read -r file; do base=$(basename "$file") - name=$(echo "$base" | cut -d '.' -f 1) - section=$(echo "$base" | cut -d '.' -f 2) + name=$(echo "$base" | rev | cut -d '.' -f 2- | rev) + section=$(echo "$base" | rev | cut -d '.' -f 1) description=$(grep '^\.Nd' "$file" | cut -d ' ' -f 2-) prefix=$(echo "$name" | cut -d '-' -f 1) - if [ "$prefix" = "telodendria" ]; then - if [ "$1" = "dev" ]; then - continue - fi - else - if [ "$1" = "user" ]; then - continue - fi - fi + case "$prefix" in + "telodendria"*) + if [ "$1" = "dev" ]; then + continue + fi + ;; + *) + if [ "$1" = "user" ]; then + continue + fi + ;; + esac printf "