diff options
author | epoch <epoch@thebackupbox.net> | 2022-09-05 08:07:50 +0000 |
---|---|---|
committer | epoch <epoch@thebackupbox.net> | 2022-09-05 08:07:50 +0000 |
commit | d085cb196811bf3529b403089bf509de17980a57 (patch) | |
tree | 29d6674e83afc47e36d8267ab3c9d5802862c469 /urititle | |
parent | afedc7a0fb30d6c4e5d01793b2a0d25f6d562666 (diff) | |
download | uritools-d085cb196811bf3529b403089bf509de17980a57.tar.gz uritools-d085cb196811bf3529b403089bf509de17980a57.zip |
shitty implementation of titles for man pages
Diffstat (limited to 'urititle')
-rwxr-xr-x | urititle | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 |