summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xurititle9
1 files changed, 9 insertions, 0 deletions
diff --git a/urititle b/urititle
index 2a02e0f..bf72f39 100755
--- a/urititle
+++ b/urititle
@@ -162,6 +162,15 @@ file)
printf "file '%s' doesn't exist.\n" "$file"
fi
;;
+man)
+ section="$(uriunescape "$path" | grep '(' | cut -d\( -f2 | tr -cd 'a-z0-9')"
+ command="$(uriunescape "$path" | cut -d\( -f1 )"
+ if [ "$section" ];then
+ apropos -s "$section" -we "${command}" | grep "^${command}"
+ else
+ apropos -we "${command}" | grep "^${command}"
+ fi
+ ;;
*)
printf "DONT KNOW HOW TO GET TITLE FOR THIS URL: %s\n" "$uri"
esac