mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-15 01:48:34 -07:00
fix(macos): fix man-preview
for macOS Ventura (#11324)
This commit is contained in:
parent
e0d0dfb845
commit
2c2187b09d
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user