mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Add Magento plugin
This commit is contained in:
parent
c79e5a97a9
commit
e57620160a
1 changed files with 20 additions and 0 deletions
20
plugins/magento/magento.plugin.zsh
Normal file
20
plugins/magento/magento.plugin.zsh
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
# magerun basic command completion
|
||||||
|
|
||||||
|
_magerun_get_command_list () {
|
||||||
|
php vendor/bin/n98-magerun --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
|
||||||
|
}
|
||||||
|
|
||||||
|
_magerun () {
|
||||||
|
if [ -f vendor/bin/n98-magerun ]; then
|
||||||
|
compadd `_magerun_get_command_list`
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
compdef _magerun vendor/bin/n98-magerun
|
||||||
|
compdef _magerun magento
|
||||||
|
compdef _magerun mage
|
||||||
|
|
||||||
|
#Alias
|
||||||
|
alias mage='vendor/bin/n98-magerun'
|
||||||
|
alias magento='vendor/bin/n98-magerun'
|
||||||
|
alias magecc='vendor/bin/n98-magerun cache:clean'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue