https://github.com/dambrogia/oh-my-zsh-plugin-magento-2
Magento 2 auto complete plugin for oh-my-zsh
https://github.com/dambrogia/oh-my-zsh-plugin-magento-2
Last synced: 4 months ago
JSON representation
Magento 2 auto complete plugin for oh-my-zsh
- Host: GitHub
- URL: https://github.com/dambrogia/oh-my-zsh-plugin-magento-2
- Owner: dambrogia
- License: mit
- Created: 2018-11-14T17:21:56.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-08-23T10:13:59.000Z (about 3 years ago)
- Last Synced: 2024-11-24T11:31:25.224Z (12 months ago)
- Language: Shell
- Size: 11.7 KB
- Stars: 25
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - magento-2 - Adds `m2` function to run magento binary, adds tab completions. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - magento-2 - Adds `m2` function to run magento binary, adds tab completions. (Plugins / ZSH on Windows)
- awesome-zsh-plugins - magento-2 - Adds `m2` function to run magento binary, adds tab completions. (Plugins / Zinit (née zplugin))
README
# Oh My ZSH Plugin - Magento 2
This plugin will allow for autocompleting Magento 2 CLI options and running the Magento binary through an `m2` function.
### Getting Started
# Add to custom plugins
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/dambrogia/oh-my-zsh-plugin-magento-2.git magento-2
# Add the magento-2 to your plugins within your ~/.zshrc
# This is based on editing the default ~/.zshrc - YMMV
plugins=(
git
magento-2
)
# Reload ~/.zshrc with new plugin
source ~/.zshrc
# Declare your Magento 2 root directory
m2:set_root
# Set your autocomplete suggestions - this will need to be updated when
# Magento 2 CLI commands are added/removed
m2:set_autocomplete
# View all availale options
m2:help
### Usage
Running the following:
m2
Should yeild results similar to what you see below:
vagrant@host /var/www/html % m2
admin:user:create dev:tests:run migrate:delta
admin:user:unlock dev:urn-catalog:generate migrate:settings
app:config:dump dev:xml:convert module:disable
app:config:import help module:enable
app:config:status i18n:collect-phrases module:status
cache:clean i18n:pack module:uninstall
...
...
Simarly, running the following:
m2 cach
Should yeild results similar to what you see below:
vagrant@host /var/www/html % m2 cache:
cache:clean cache:disable cache:enable cache:flush cache:status
### Troubleshooting
Error messages are a point point because of how Zsh handles the autofill. For any errors you might run into, it is recommended to do the following:
#### Confirm the `/bin/magento` binary is executable
chmod u+x /bin/magento
____
#### Confirm the Magento root directory set is correct
m2:get_root
If needed, correct the root directory set with:
m2:set_root
____
#### Reset the autocomplete suggestions
m2:set_autocomplete
____
#### Other issues
View all options that are available:
m2:help