mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 23:30:08 +00:00
Add README for OSX plugin and refactor plugin file
This commit is contained in:
parent
137a554e48
commit
46c0d9590d
3 changed files with 28 additions and 20 deletions
27
plugins/osx/README.md
Normal file
27
plugins/osx/README.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# OSX plugin
|
||||
|
||||
## Description
|
||||
|
||||
This plugin provides a few utilities to make it more enjoyable on OSX.
|
||||
|
||||
To start using it, add the `osx` plugin to your plugins array in `~/.zshrc`:
|
||||
|
||||
```zsh
|
||||
plugins=(... osx)
|
||||
```
|
||||
|
||||
Original author: [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||
|
||||
|
||||
## Commands
|
||||
|
||||
| Command | Description |
|
||||
|:--------------|:-----------------------------------------------|
|
||||
| `tab` | Open the current directory in a new tab |
|
||||
| `ofd` | Open the current directory in a Finder window |
|
||||
| `pfd` | Return the path of the frontmost Finder window |
|
||||
| `pfs` | Return the current Finder selection |
|
||||
| `cdf` | `cd` to the current Finder directory |
|
||||
| `pushdf` | `pushd` to the current Finder directory |
|
||||
| `quick-look` | Quick-Look a specified file |
|
||||
| `man-preview` | Open a specified man page in Preview app |
|
|
@ -1,5 +0,0 @@
|
|||
#compdef man-preview
|
||||
#autoload
|
||||
|
||||
_man
|
||||
|
|
@ -1,10 +1,3 @@
|
|||
# ------------------------------------------------------------------------------
|
||||
# FILE: osx.plugin.zsh
|
||||
# DESCRIPTION: oh-my-zsh plugin file.
|
||||
# AUTHOR: Sorin Ionescu (sorin.ionescu@gmail.com)
|
||||
# VERSION: 1.1.0
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# Open the current directory in a Finder window
|
||||
alias ofd='open_command $PWD'
|
||||
|
||||
|
@ -154,14 +147,6 @@ function pfd() {
|
|||
EOF
|
||||
}
|
||||
|
||||
function ofd() {
|
||||
osascript 2>/dev/null <<EOF
|
||||
tell application "Finder"
|
||||
open POSIX file "$PWD"
|
||||
end tell
|
||||
EOF
|
||||
}
|
||||
|
||||
function pfs() {
|
||||
osascript 2>/dev/null <<EOF
|
||||
set output to ""
|
||||
|
@ -190,6 +175,7 @@ function quick-look() {
|
|||
function man-preview() {
|
||||
man -t "$@" | open -f -a Preview
|
||||
}
|
||||
compdef man-preview=man
|
||||
|
||||
function vncviewer() {
|
||||
open vnc://$@
|
||||
|
|
Loading…
Reference in a new issue