From cc7c6980da55eba15dd38bfd00f3e8fc1b454b7a Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 23 Nov 2023 19:20:22 +0100 Subject: woman: Add script for opening manuals as PDFs --- .local/bin/woman | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 .local/bin/woman (limited to '.local') diff --git a/.local/bin/woman b/.local/bin/woman new file mode 100755 index 0000000..b63dac2 --- /dev/null +++ b/.local/bin/woman @@ -0,0 +1,11 @@ +#!/bin/sh + +apropos . \ +| sed -E 's/ (\([^)]+\))\s*-/\1 —/' \ +| sort \ +| osel \ +| sed -E 's/([^(]+)\(([^)]+)\).*/\2 \1/' \ +| { + read p s + [ -n "$p" -a -n "$s" ] && man -Tpdf "$p" "$s" | zathura - +} -- cgit v1.2.3