From d085cb196811bf3529b403089bf509de17980a57 Mon Sep 17 00:00:00 2001 From: epoch Date: Mon, 5 Sep 2022 08:07:50 +0000 Subject: shitty implementation of titles for man pages --- urititle | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'urititle') 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 -- cgit v1.2.3