mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-08-19 11:02:20 +02:00
feat(macos): allow multiple man pages in man-preview
(#11365)
This commit is contained in:
@@ -224,9 +224,10 @@ function quick-look() {
|
||||
}
|
||||
|
||||
function man-preview() {
|
||||
local location
|
||||
# Don't let Preview.app steal focus if the man page doesn't exist
|
||||
location=$(man -w "$@") && mandoc -Tpdf $location | open -f -a Preview
|
||||
local page
|
||||
for page in "${(@f)"$(man -w $@)"}"; do
|
||||
command mandoc -Tpdf $page | open -f -a Preview
|
||||
done
|
||||
}
|
||||
compdef _man man-preview
|
||||
|
||||
|
Reference in New Issue
Block a user