1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-07-01 03:29:26 +00:00

[osx] Support custom keyword used by mand to open man pages in Dash.app

`zstyle` based customization is now avaialble in *zpreztorc*.
This commit is contained in:
Indrajit Raychaudhuri
2017-07-22 17:43:39 -05:00
parent 8846db9d4d
commit d6276e8025
3 changed files with 24 additions and 1 deletions

View File

@ -7,7 +7,8 @@
function mand {
if (( $# > 0 )); then
open "dash://manpages:$1" 2>/dev/null
zstyle -s ':prezto:module:osx:man' dash-keyword 'dashkw' || dashkw='manpages'
open "dash://$dashkw:$1" 2>/dev/null
if (( $? != 0 )); then
print "$0: Dash is not installed" >&2
break
@ -15,6 +16,8 @@ function mand {
else
print 'What manual page do you want?' >&2
fi
unset dashkw
}
mand "$@"