Unverified Commit 2c2187b0 authored by cxy004's avatar cxy004 Committed by GitHub

fix(macos): fix `man-preview` for macOS Ventura (#11324)

parent e0d0dfb8
...@@ -224,8 +224,9 @@ function quick-look() { ...@@ -224,8 +224,9 @@ function quick-look() {
} }
function man-preview() { function man-preview() {
local location
# Don't let Preview.app steal focus if the man page doesn't exist # 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 "$@" location=$(man -w "$@") && mandoc -Tpdf $location | open -f -a Preview
} }
compdef _man man-preview 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