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:
@ -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 "$@"
|
||||
|
Reference in New Issue
Block a user