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