diff options
author | Marc Cornellà <marc.cornella@live.com> | 2016-06-16 00:23:09 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2016-06-16 00:23:09 +0200 |
commit | 46c0d9590d38f98ab7f69f48c067715077fe49cb (patch) | |
tree | 3c5f1976f05c6b933236bcde693b9d1f3c8a0920 | |
parent | 137a554e48263b1517dced417e36836157f062f5 (diff) | |
download | zsh-46c0d9590d38f98ab7f69f48c067715077fe49cb.tar.gz zsh-46c0d9590d38f98ab7f69f48c067715077fe49cb.tar.bz2 zsh-46c0d9590d38f98ab7f69f48c067715077fe49cb.zip |
Add README for OSX plugin and refactor plugin file
-rw-r--r-- | plugins/osx/README.md | 27 | ||||
-rw-r--r-- | plugins/osx/_man-preview | 5 | ||||
-rw-r--r-- | plugins/osx/osx.plugin.zsh | 16 |
3 files changed, 28 insertions, 20 deletions
diff --git a/plugins/osx/README.md b/plugins/osx/README.md new file mode 100644 index 000000000..a06184a45 --- /dev/null +++ b/plugins/osx/README.md @@ -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 | diff --git a/plugins/osx/_man-preview b/plugins/osx/_man-preview deleted file mode 100644 index 6cc344ad4..000000000 --- a/plugins/osx/_man-preview +++ /dev/null @@ -1,5 +0,0 @@ -#compdef man-preview -#autoload - -_man - diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index a80b19926..c66325cde 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -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://$@ |