dotfiles/.bin/dexec_man
2023-11-19 08:40:50 +01:00

25 lines
533 B
Bash
Executable File

#!/bin/sh
. $HOME/.bin/_config
MAN1=$(man -s1 -k .)
MAN2=$(man -s2 -k .)
MAN3=$(man -s3 -k .)
MAN3P=$(man -s3p -k .)
MAN4=$(man -s4 -k .)
MAN5=$(man -s5 -k .)
MAN6=$(man -s6 -k .)
MAN7=$(man -s7 -k .)
MAN8=$(man -s8 -k .)
MAN9=$(man -s9 -k .)
SEL=$(echo "$MAN1" "$MAN2" "$MAN3" "$MAN4" \
"$MAN5" "$MAN6" "$MAN7" "$MAN8" \
"$MAN9" "$MAN3P" | $DMENU_CMD -p "Man")
[ -z "$SEL" ] && exit 0
N=$(echo "$SEL" | cut -d"(" -f2 | cut -d")" -f1)
M=$(echo "$SEL" | cut -d"(" -f1 | cut -d"," -f1)
bterm -e man -s $N $M