diff options
| author | Johan Kaving <johan.kaving@looklet.com> | 2024-01-06 12:32:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-06 12:32:18 +0100 |
| commit | 428866e28def25593e7dd73f1c3bd909db47635b (patch) | |
| tree | 0f1312e0d141280ada776dd9dfb88fa5970d71b5 /plugins/macos | |
| parent | 8980ffebbc8e38e8a25cdeba2ef78d7e5d0d0d62 (diff) | |
| download | zsh-428866e28def25593e7dd73f1c3bd909db47635b.tar.gz zsh-428866e28def25593e7dd73f1c3bd909db47635b.tar.bz2 zsh-428866e28def25593e7dd73f1c3bd909db47635b.zip | |
fix(macos): print usage for `man-preview` with no args (#12147)
Diffstat (limited to 'plugins/macos')
| -rw-r--r-- | plugins/macos/macos.plugin.zsh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/macos/macos.plugin.zsh b/plugins/macos/macos.plugin.zsh index e27d412c8..a4347005e 100644 --- a/plugins/macos/macos.plugin.zsh +++ b/plugins/macos/macos.plugin.zsh @@ -224,6 +224,8 @@ function quick-look() { } function man-preview() { + [[ $# -eq 0 ]] && >&2 echo "Usage: $0 command1 [command2 ...]" && return 1 + local page for page in "${(@f)"$(man -w $@)"}"; do command mandoc -Tpdf $page | open -f -a Preview |
