prezto/modules/osx/functions/manp
Kaleb Elwert 47467a1b0e Update functions to all use POSIX syntax
I'm not a huge fan of this change, as I've made it known. However, this
is semi-recommended by the style guide we've chosen to use and is a more
common syntax.

Fixes #692.
2017-07-05 23:21:38 -07:00

19 lines
289 B
Text

#
# Opens man pages in Preview.app.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
manp() {
local page
if (( $# > 0 )); then
for page in "$@"; do
man -t "$page" | open -f -a Preview
done
else
print 'What manual page do you want?' >&2
fi
}
manp "$@"