diff options
author | Andrew Janke <andrew@apjanke.net> | 2015-09-03 13:05:24 -0400 |
---|---|---|
committer | Andrew Janke <andrew@apjanke.net> | 2015-09-03 13:05:24 -0400 |
commit | 93b4a6c02eeafb875de5d9bcccd73bdcd8265f40 (patch) | |
tree | 7cc87fcd416bf71cee77f30bf2e60cf607671f43 /plugins/n98-magerun | |
parent | 689b5ab3c8c8bf30ee63cafb8401d7d95e41f359 (diff) | |
parent | 0532860c618aabc02d5dab34391b967e8e4c6272 (diff) | |
download | zsh-93b4a6c02eeafb875de5d9bcccd73bdcd8265f40.tar.gz zsh-93b4a6c02eeafb875de5d9bcccd73bdcd8265f40.tar.bz2 zsh-93b4a6c02eeafb875de5d9bcccd73bdcd8265f40.zip |
Merge branch 'master' into osx-fix-tab-for-iterm
Conflicts:
plugins/osx/osx.plugin.zsh
Diffstat (limited to 'plugins/n98-magerun')
-rwxr-xr-x | plugins/n98-magerun/n98-magerun.plugin.zsh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/plugins/n98-magerun/n98-magerun.plugin.zsh b/plugins/n98-magerun/n98-magerun.plugin.zsh new file mode 100755 index 000000000..bfcf27b98 --- /dev/null +++ b/plugins/n98-magerun/n98-magerun.plugin.zsh @@ -0,0 +1,34 @@ +# ------------------------------------------------------------------------------ +# FILE: n98-magerun.plugin.zsh +# DESCRIPTION: oh-my-zsh n98-magerun plugin file. Adapted from composer plugin +# AUTHOR: Andrew Dwyer (andrewrdwyer at gmail dot com) +# VERSION: 1.0.0 +# ------------------------------------------------------------------------------ + +# n98-magerun basic command completion +_n98_magerun_get_command_list () { + $_comp_command1 --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z\-:]+/ { print $1 }' +} + + +_n98_magerun () { + _arguments '1: :->command' '*:optional arg:_files' + + case $state in + command) + compadd $(_n98_magerun_get_command_list) + ;; + *) + esac +} + +compdef _n98_magerun n98-magerun.phar +compdef _n98_magerun n98-magerun + +# Aliases +alias n98='n98-magerun.phar' +alias mage='n98-magerun.phar' +alias magefl='n98-magerun.phar cache:flush' + +# Install n98-magerun into the current directory +alias mage-get='wget https://raw.github.com/netz98/n98-magerun/master/n98-magerun.phar' |