1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-16 02:40:08 +00:00

fix(macos): print usage for man-preview with no args (#12147)

This commit is contained in:
Johan Kaving 2024-01-06 12:32:18 +01:00 committed by GitHub
parent 8980ffebbc
commit 428866e28d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -224,6 +224,8 @@ function quick-look() {
} }
function man-preview() { function man-preview() {
[[ $# -eq 0 ]] && >&2 echo "Usage: $0 command1 [command2 ...]" && return 1
local page local page
for page in "${(@f)"$(man -w $@)"}"; do for page in "${(@f)"$(man -w $@)"}"; do
command mandoc -Tpdf $page | open -f -a Preview command mandoc -Tpdf $page | open -f -a Preview