@@ -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