Skip to content

Instantly share code, notes, and snippets.

@htor
Created November 2, 2012 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save htor/4000306 to your computer and use it in GitHub Desktop.
Save htor/4000306 to your computer and use it in GitHub Desktop.
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