summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-25 19:25:52 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-25 19:25:52 +0100
commitd5c098d56c863edfc3f1418400e9c58c5e70bec4 (patch)
tree2b88e2d39d7de94e20f95eacff8e166fdec97ca6
parent09a540b74fc84321477c7c15dd61666c80a74602 (diff)
woman: Don’t open as PDF when stderr is a TTY
-rwxr-xr-x.local/bin/woman3
1 files changed, 2 insertions, 1 deletions
diff --git a/.local/bin/woman b/.local/bin/woman
index f8469b8..bbabc8e 100755
--- a/.local/bin/woman
+++ b/.local/bin/woman
@@ -7,5 +7,6 @@ apropos . \
| sed 's/\s.*//' \
| {
IFS= read -r page
- [ -n "$page" ] && man -Tpdf "$page" | zathura -
+ [ -n "$page" -a ! -t 2 ] && man -Tpdf "$page" | zathura -
+ [ -n "$page" -a -t 2 ] && man "$page"
}