dotfiles/home/.local/bin/scripts/gui/prompt/dmenu-scripts/dman

12 lines
216 B
Plaintext
Raw Normal View History

2022-10-29 18:25:42 +00:00
#!/bin/sh
# Dmenu prompt to easily search for a man page to open
page="$(apropos --long "$1" | dmenu -i -l 10 | awk '{print $2, $1}' | tr -d '()')"
if tty -s; then
man $page
else
$TERMINAL -e man $page
fi