summaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-23 19:32:26 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-23 19:32:26 +0100
commitabcc767eba2850261cd38d98902b57d5898c1a49 (patch)
tree86bc2329876073363155d7deac70bca4abc35b74 /.local
parent522f5a1b24d800917984a501865ef93d8329330f (diff)
woman: Simplify script
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/woman6
1 files changed, 3 insertions, 3 deletions
diff --git a/.local/bin/woman b/.local/bin/woman
index b63dac2..f8469b8 100755
--- a/.local/bin/woman
+++ b/.local/bin/woman
@@ -4,8 +4,8 @@ apropos . \
| sed -E 's/ (\([^)]+\))\s*-/\1 —/' \
| sort \
| osel \
-| sed -E 's/([^(]+)\(([^)]+)\).*/\2 \1/' \
+| sed 's/\s.*//' \
| {
- read p s
- [ -n "$p" -a -n "$s" ] && man -Tpdf "$p" "$s" | zathura -
+ IFS= read -r page
+ [ -n "$page" ] && man -Tpdf "$page" | zathura -
}