diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-11-23 19:20:22 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-11-23 19:20:22 +0100 |
commit | cc7c6980da55eba15dd38bfd00f3e8fc1b454b7a (patch) | |
tree | e11c43464a2a866de8088cbd6e1e27628bec4e3b /.local/bin | |
parent | 28874c7b31e8758c4302a0cb46e6300935bb3a21 (diff) |
woman: Add script for opening manuals as PDFs
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/woman | 11 |
1 files changed, 11 insertions, 0 deletions
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 - +} |