n98-magerun.plugin.zsh 906 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
# ------------------------------------------------------------------------------
# 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 () {
10
  n98-magerun.phar --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z\-:]+/ { print $1 }'
11
12
13
14
15
16
17
}

_n98_magerun () {
  compadd `_n98_magerun_get_command_list`
}

compdef _n98_magerun n98-magerun.phar
18
compdef _n98_magerun n98-magerun
19
20

# Aliases
21
alias n98='n98-magerun.phar'
22
23
24
25
26
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'