c45fff1f81f16a8c41a0576676642b084e727348

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #2367 from andrew-dwyer/n98-magerun

New plugin for the n98-magerun Magento command line tool

Diff

 1diff --git a/plugins/n98-magerun/n98-magerun.plugin.zsh b/plugins/n98-magerun/n98-magerun.plugin.zsh
 2new file mode 100755
 3index 0000000000000000000000000000000000000000..bfcf27b984ada059662eb28f559671b72863e3fe
 4--- /dev/null
 5+++ b/plugins/n98-magerun/n98-magerun.plugin.zsh
 6@@ -0,0 +1,34 @@
 7+# ------------------------------------------------------------------------------
 8+# FILE: n98-magerun.plugin.zsh
 9+# DESCRIPTION: oh-my-zsh n98-magerun plugin file. Adapted from composer plugin 
10+# AUTHOR: Andrew Dwyer (andrewrdwyer at gmail dot com)
11+# VERSION: 1.0.0
12+# ------------------------------------------------------------------------------
13+
14+# n98-magerun basic command completion
15+_n98_magerun_get_command_list () {
16+  $_comp_command1 --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z\-:]+/ { print $1 }'
17+}
18+
19+
20+_n98_magerun () {
21+  _arguments '1: :->command' '*:optional arg:_files'
22+
23+  case $state in
24+    command)
25+      compadd $(_n98_magerun_get_command_list)
26+      ;;
27+    *)
28+  esac
29+}
30+
31+compdef _n98_magerun n98-magerun.phar
32+compdef _n98_magerun n98-magerun
33+
34+# Aliases
35+alias n98='n98-magerun.phar'
36+alias mage='n98-magerun.phar'
37+alias magefl='n98-magerun.phar cache:flush'
38+
39+# Install n98-magerun into the current directory
40+alias mage-get='wget https://raw.github.com/netz98/n98-magerun/master/n98-magerun.phar'