Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
16050ab8
Unverified
Commit
16050ab8
authored
Feb 26, 2023
by
Richard Mitchell
Committed by
GitHub
Feb 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(macos): allow multiple man pages in `man-preview` (#11365)
parent
0ca8907f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
README.md
plugins/macos/README.md
+1
-1
macos.plugin.zsh
plugins/macos/macos.plugin.zsh
+4
-3
No files found.
plugins/macos/README.md
View file @
16050ab8
...
@@ -25,7 +25,7 @@ Original author: [Sorin Ionescu](https://github.com/sorin-ionescu)
...
@@ -25,7 +25,7 @@ Original author: [Sorin Ionescu](https://github.com/sorin-ionescu)
|
`pxd`
| Return the current Xcode project directory |
|
`pxd`
| Return the current Xcode project directory |
|
`cdx`
|
`cd`
to the current Xcode project directory |
|
`cdx`
|
`cd`
to the current Xcode project directory |
|
`quick-look`
| Quick-Look a specified file |
|
`quick-look`
| Quick-Look a specified file |
|
`man-preview`
| Open
a specified man page in Preview app
|
|
`man-preview`
| Open
man pages in Preview app
|
|
`showfiles`
| Show hidden files in Finder |
|
`showfiles`
| Show hidden files in Finder |
|
`hidefiles`
| Hide the hidden files in Finder |
|
`hidefiles`
| Hide the hidden files in Finder |
|
`itunes`
| _DEPRECATED_. Use
`music`
from macOS Catalina on |
|
`itunes`
| _DEPRECATED_. Use
`music`
from macOS Catalina on |
...
...
plugins/macos/macos.plugin.zsh
View file @
16050ab8
...
@@ -224,9 +224,10 @@ function quick-look() {
...
@@ -224,9 +224,10 @@ function quick-look() {
}
}
function
man-preview
()
{
function
man-preview
()
{
local
location
local
page
# Don't let Preview.app steal focus if the man page doesn't exist
for
page
in
"
${
(@f)
"
$(
man
-w
$@
)
"
}
"
;
do
location
=
$(
man
-w
"
$@
"
)
&&
mandoc
-Tpdf
$location
| open
-f
-a
Preview
command
mandoc
-Tpdf
$page
| open
-f
-a
Preview
done
}
}
compdef _man man-preview
compdef _man man-preview
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment