From e57620160aa99706998c0e84418520e8bae64cdd Mon Sep 17 00:00:00 2001 From: Thomas Birke Date: Thu, 10 Oct 2013 10:03:23 +0200 Subject: [PATCH] Add Magento plugin --- plugins/magento/magento.plugin.zsh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 plugins/magento/magento.plugin.zsh diff --git a/plugins/magento/magento.plugin.zsh b/plugins/magento/magento.plugin.zsh new file mode 100644 index 000000000..835a0c553 --- /dev/null +++ b/plugins/magento/magento.plugin.zsh @@ -0,0 +1,20 @@ +# magerun basic command completion + +_magerun_get_command_list () { + php vendor/bin/n98-magerun --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' +} + +_magerun () { + if [ -f vendor/bin/n98-magerun ]; then + compadd `_magerun_get_command_list` + fi +} + +compdef _magerun vendor/bin/n98-magerun +compdef _magerun magento +compdef _magerun mage + +#Alias +alias mage='vendor/bin/n98-magerun' +alias magento='vendor/bin/n98-magerun' +alias magecc='vendor/bin/n98-magerun cache:clean'