Skip to content

Instantly share code, notes, and snippets.

@htor

htor/gist:4000306

Created Nov 2, 2012
Embed
What would you like to do?
woman
# search and browse manpages interactively
function woman {
err="usage: $FUNCNAME [object]"
test $# -ne 1 && echo $err && return 1
IFS=$'\n' manpgs=( $(apropos $1 | grep ^$1) )
select line in ${manpgs[@]}; do
n=${line%%) *}; n=${n#* (}
man ${n} ${line%% *}
return 0
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.