mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-10-02 16:03:47 +02:00
fix(osx): only run Preview.app in man-preview if man page exists (#10222)
This commit is contained in:
1 parent
33c86fe80b
commit
4ae5bdebc3
1 file changed
+2
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user