00b2cc653421c1465f7596f22c19d21f42aa0396
- Author
- Andrew Dwyer <andrewrdwyer@gmail.com>
- Committer
- Andrew Dwyer <andrewrdwyer@gmail.com>
- Date
Message
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..e4b0d68854139700d08aad20fc6a40be15320dd5
4--- /dev/null
5+++ b/plugins/n98-magerun/n98-magerun.plugin.zsh
6@@ -0,0 +1,25 @@
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+ n98-magerun.phar --no-ansi | sed "1,/Available commands/d" | awk '/^\s+[a-z]+/ { print $1 }'
17+}
18+
19+_n98_magerun () {
20+ compadd `_n98_magerun_get_command_list`
21+}
22+
23+compdef _n98_magerun n98-magerun.phar
24+
25+# Aliases
26+alias n98-magerun='n98-magerun.phar'
27+alias mage='n98-magerun.phar'
28+alias magefl='n98-magerun.phar cache:flush'
29+
30+# Install n98-magerun into the current directory
31+alias mage-get='wget https://raw.github.com/netz98/n98-magerun/master/n98-magerun.phar'