2013-12-21 01:47:05 +01:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# FILE: n98-magerun.plugin.zsh
|
2024-03-26 09:55:16 +01:00
|
|
|
# DESCRIPTION: oh-my-zsh n98-magerun plugin file. Adapted from composer plugin
|
2013-12-21 01:47:05 +01:00
|
|
|
# AUTHOR: Andrew Dwyer (andrewrdwyer at gmail dot com)
|
2019-08-07 20:16:25 +02:00
|
|
|
# AUTHOR: Jisse Reitsma (jisse at yireo dot com)
|
|
|
|
# VERSION: 1.1.0
|
2013-12-21 01:47:05 +01:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# n98-magerun basic command completion
|
|
|
|
_n98_magerun_get_command_list () {
|
2015-05-09 08:13:30 +02:00
|
|
|
$_comp_command1 --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z\-:]+/ { print $1 }'
|
2013-12-21 01:47:05 +01:00
|
|
|
}
|
|
|
|
|
2015-05-09 08:13:30 +02:00
|
|
|
|
2013-12-21 01:47:05 +01:00
|
|
|
_n98_magerun () {
|
2015-05-09 08:13:30 +02:00
|
|
|
_arguments '1: :->command' '*:optional arg:_files'
|
|
|
|
|
|
|
|
case $state in
|
|
|
|
command)
|
|
|
|
compadd $(_n98_magerun_get_command_list)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
esac
|
2013-12-21 01:47:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
compdef _n98_magerun n98-magerun.phar
|
2015-05-09 07:03:01 +02:00
|
|
|
compdef _n98_magerun n98-magerun
|
2019-08-07 20:16:25 +02:00
|
|
|
compdef _n98_magerun n98-magerun2.phar
|
|
|
|
compdef _n98_magerun n98-magerun2
|
2013-12-21 01:47:05 +01:00
|
|
|
|
|
|
|
# Aliases
|
2015-05-09 07:03:01 +02:00
|
|
|
alias n98='n98-magerun.phar'
|
2013-12-21 01:47:05 +01:00
|
|
|
alias mage='n98-magerun.phar'
|
2019-08-07 20:16:25 +02:00
|
|
|
alias magerun='n98-magerun.phar'
|
|
|
|
|
|
|
|
alias n98-2='n98-magerun2.phar'
|
|
|
|
alias mage2='n98-magerun2.phar'
|
|
|
|
alias magerun2='n98-magerun2.phar'
|
2013-12-21 01:47:05 +01:00
|
|
|
|
|
|
|
# Install n98-magerun into the current directory
|
2019-08-07 20:16:25 +02:00
|
|
|
alias mage-get='wget https://files.magerun.net/n98-magerun.phar'
|
|
|
|
alias mage2-get='wget https://files.magerun.net/n98-magerun2.phar'
|