From d4acc8148a072334f53e0aefda9c890775eb792e Mon Sep 17 00:00:00 2001 From: Felix Sonntag Date: Sat, 17 Jan 2015 01:34:24 +0100 Subject: [PATCH] osx plugin: added descriptions, split up files, minor changes --- plugins/osx/OSX-README.markdown | 12 ++-- plugins/osx/cdf.fish | 12 ++++ plugins/osx/itunes.fish | 36 +++++++++++ plugins/osx/manp.fish | 12 ++++ plugins/osx/osx.load | 104 -------------------------------- plugins/osx/pfd.fish | 15 +++++ plugins/osx/pfs.fish | 20 ++++++ plugins/osx/pushdf.fish | 12 ++++ plugins/osx/ql.fish | 14 +++++ plugins/osx/tab.fish | 14 +++++ plugins/osx/trash.fish | 23 +++++++ 11 files changed, 164 insertions(+), 110 deletions(-) create mode 100644 plugins/osx/cdf.fish create mode 100644 plugins/osx/itunes.fish create mode 100644 plugins/osx/manp.fish delete mode 100644 plugins/osx/osx.load create mode 100644 plugins/osx/pfd.fish create mode 100644 plugins/osx/pfs.fish create mode 100644 plugins/osx/pushdf.fish create mode 100644 plugins/osx/ql.fish create mode 100644 plugins/osx/tab.fish create mode 100644 plugins/osx/trash.fish diff --git a/plugins/osx/OSX-README.markdown b/plugins/osx/OSX-README.markdown index 172661e..2fda50d 100644 --- a/plugins/osx/OSX-README.markdown +++ b/plugins/osx/OSX-README.markdown @@ -6,12 +6,12 @@ osx Inspired by the oh-my-zsh plugin by [sorin-ionescu](https://github.com/sorin-ionescu) https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/osx/osx.plugin.zsh -- `tab` - open the current directory in a new tab -- `pfd` - return the path of the frontmost Finder window -- `pfs` - return the current Finder selection +- `tab` - Open the current directory in a new tab +- `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 - `ql` - Quick Look a specified file -- `manp` - open a specified man page in Preview -- `trash` - move a specified file to the Trash -- `itunes` - play, pause etc. iTunes +- `manp` - Open a specified man page in Preview +- `trash` - Move a specified file to the Trash +- `itunes` - Play, pause etc. iTunes diff --git a/plugins/osx/cdf.fish b/plugins/osx/cdf.fish new file mode 100644 index 0000000..fc0d80a --- /dev/null +++ b/plugins/osx/cdf.fish @@ -0,0 +1,12 @@ +# cd to the current Finder directory + +function cdf + if count $argv >/dev/null + switch $argv[1] + case -d --description + echo "cd to the current Finder directory" + return 0 + end + end + cd (pfd) +end \ No newline at end of file diff --git a/plugins/osx/itunes.fish b/plugins/osx/itunes.fish new file mode 100644 index 0000000..2262b14 --- /dev/null +++ b/plugins/osx/itunes.fish @@ -0,0 +1,36 @@ +# Play, pause etc. iTunes + +function itunes + if count $argv >/dev/null + set -l opt $argv[1] + switch $opt + case -d --description + echo "Play, pause etc. iTunes. Use -h or --help for a more detailed description." + return 0 + case launch play pause stop rewind resume quit + case mute + set opt "set mute to true" + case unmute + set opt "set mute to false" + case next previous + set opt "$opt track" + case vol volume + set opt "set sound volume to $argv[2]" + case "" -h --help + echo "Usage: itunes