Unverified Commit 4ae5bdeb authored by April King's avatar April King Committed by GitHub

fix(osx): only run Preview.app in `man-preview` if man page exists (#10222)

parent 33c86fe8
......@@ -219,7 +219,8 @@ function quick-look() {
}
function man-preview() {
man -t "$@" | open -f -a Preview
# Don't let Preview.app steal focus if the man page doesn't exist
man -w "$@" &>/dev/null && man -t "$@" | open -f -a Preview || man "$@"
}
compdef _man man-preview
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment