]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/n98-magerun/n98-magerun.plugin.zsh
d79aee7eb88211bb540cda6af37180bda1d63bb4
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / n98-magerun / n98-magerun.plugin.zsh
1 # ------------------------------------------------------------------------------
2 # FILE: n98-magerun.plugin.zsh
3 # DESCRIPTION: oh-my-zsh n98-magerun plugin file. Adapted from composer plugin 
4 # AUTHOR: Andrew Dwyer (andrewrdwyer at gmail dot com)
5 # AUTHOR: Jisse Reitsma (jisse at yireo dot com)
6 # VERSION: 1.1.0
7 # ------------------------------------------------------------------------------
8
9 # n98-magerun basic command completion
10 _n98_magerun_get_command_list () {
11   $_comp_command1 --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z\-:]+/ { print $1 }'
12 }
13
14
15 _n98_magerun () {
16   _arguments '1: :->command' '*:optional arg:_files'
17
18   case $state in
19     command)
20       compadd $(_n98_magerun_get_command_list)
21       ;;
22     *)
23   esac
24 }
25
26 compdef _n98_magerun n98-magerun.phar
27 compdef _n98_magerun n98-magerun
28 compdef _n98_magerun n98-magerun2.phar
29 compdef _n98_magerun n98-magerun2
30
31 # Aliases
32 alias n98='n98-magerun.phar'
33 alias mage='n98-magerun.phar'
34 alias magerun='n98-magerun.phar'
35
36 alias n98-2='n98-magerun2.phar'
37 alias mage2='n98-magerun2.phar'
38 alias magerun2='n98-magerun2.phar'
39
40 # Install n98-magerun into the current directory
41 alias mage-get='wget https://files.magerun.net/n98-magerun.phar'
42 alias mage2-get='wget https://files.magerun.net/n98-magerun2.phar'