mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-11-14 12:17:17 +00:00
12 lines
243 B
Plaintext
12 lines
243 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
# Menu prompt to easily search for a man page to open
|
||
|
|
||
|
page="$(apropos --long "$1" | menuprompt --choose -p "Pick man page" | awk '{print $2, $1}' | tr -d '()')"
|
||
|
|
||
|
if tty -s; then
|
||
|
man "$page"
|
||
|
else
|
||
|
$TERMINAL -e man "$page"
|
||
|
fi
|