diff options
author | Andrew Dwyer <andrewrdwyer@gmail.com> | 2013-12-21 11:17:05 +1030 |
---|---|---|
committer | Andrew Dwyer <andrewrdwyer@gmail.com> | 2013-12-21 11:17:05 +1030 |
commit | 00b2cc653421c1465f7596f22c19d21f42aa0396 (patch) | |
tree | bb54aa3d233f83ff2625213b842a384df45000c2 /plugins/n98-magerun/n98-magerun.plugin.zsh | |
parent | a38af27991d15d14ac4ca55c919bb694d7eafb7a (diff) | |
download | zsh-00b2cc653421c1465f7596f22c19d21f42aa0396.tar.gz zsh-00b2cc653421c1465f7596f22c19d21f42aa0396.tar.bz2 zsh-00b2cc653421c1465f7596f22c19d21f42aa0396.zip |
New plugin for the n98-magerun Magento command line tool
Diffstat (limited to 'plugins/n98-magerun/n98-magerun.plugin.zsh')
-rwxr-xr-x | plugins/n98-magerun/n98-magerun.plugin.zsh | 25 |
1 files changed, 25 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..e4b0d6885 --- /dev/null +++ b/plugins/n98-magerun/n98-magerun.plugin.zsh @@ -0,0 +1,25 @@ +# ------------------------------------------------------------------------------ +# 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 () { + n98-magerun.phar --no-ansi | sed "1,/Available commands/d" | awk '/^\s+[a-z]+/ { print $1 }' +} + +_n98_magerun () { + compadd `_n98_magerun_get_command_list` +} + +compdef _n98_magerun n98-magerun.phar + +# Aliases +alias n98-magerun='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' |