From 2119568d86d35c4ed9e705d425ec4f37575ba015 Mon Sep 17 00:00:00 2001 From: Abdulrahman Masoud Date: Sat, 7 Dec 2024 08:19:46 +0200 Subject: [PATCH] Add list of aliases for magento2 --- plugins/magento2/README.md | 73 ++++++++++++++++++++++++++++ plugins/magento2/magento2.plugin.zsh | 47 ++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 plugins/magento2/README.md create mode 100644 plugins/magento2/magento2.plugin.zsh diff --git a/plugins/magento2/README.md b/plugins/magento2/README.md new file mode 100644 index 000000000..0a12e2e20 --- /dev/null +++ b/plugins/magento2/README.md @@ -0,0 +1,73 @@ +```markdown +# Magento 2 + +This plugin adds aliases for Magento2 commands. + +```bash +plugins=(... magento2) +``` + +| Alias | Description | +|:-:|:-:| +| `magento`| `bin/magento` | +| `mup` | `bin/magento setup:upgrade` | +| `mdeploy` | `bin/magento setup:static-content:deploy -f` | +| `mdi` | `bin/magento setup:di:compile` | + +## Database + +| Alias | Description | +|:-:|:-:| +| `mreindex` | `bin/magento indexer:reindex` | +| `minf` | `bin/magento indexer:info` | +| `mid` | `bin/magento indexer:disable` | +| `mien` | `bin/magento indexer:enable` | + +## Maintenance + +| Alias | Description | +|:-:|:-:| +| `mmt` | `bin/magento maintenance:enable` | +| `mmf` | `bin/magento maintenance:disable` | + +## Clears + +| Alias | Description | +|:-:|:-:| +| `mcc` | `bin/magento cache:clean` | +| `mcf` | `bin/magento cache:flush` | +| `mtcc` | `bin/magento cache:clean` | +| `mtcf` | `bin/magento cache:flush` | +| `mtccf` | `bin/magento cache:flush && bin/magento cache:clean` | + +## Admin + +| Alias | Description | +|:-:|:-:| +| `mac` | `bin/magento bin\magento a:u:c` | +| `mau` | `bin/magento bin\magento a:u:u` | +| `maurl` | `bin/magento bin\magento i:a` | + +## Queues + +| Alias | Description | +|:-:|:-:| +| `mqs` | `bin/magento queue:consumers:start` | + +## Logs + +| Alias | Description | +|:-:|:-:| +| `mlog`| `tail -f var/log/*.log` | +| `mslog`| `tail -f var/log/system.log` | +| `melog`| `tail -f var/log/exeption.log` | + +## Development + +| Alias | Description | +|:-:|:-:| +| `mms` | `'bin\magento module:status` | +| `mme` | `'bin\magento module:enable` | +| `mmd` | `'bin\magento module:disable` | + +``` \ No newline at end of file diff --git a/plugins/magento2/magento2.plugin.zsh b/plugins/magento2/magento2.plugin.zsh new file mode 100644 index 000000000..1d004962c --- /dev/null +++ b/plugins/magento2/magento2.plugin.zsh @@ -0,0 +1,47 @@ +#!zsh +alias magento='bin/magento' + +# Setup +alias mup='bin/magento setup:upgrade' +alias mdeploy='bin/magento setup:static-content:deploy -f' +alias mdi='bin/magento setup:di:compile' + +# Cache +alias mcc='bin/magento cache:clean' +alias mcf='bin/magento cache:flush' +alias mccf='bin/magento cache:flush && bin/magento cache:clean' + +# Database +alias mreindex='bin/magento indexer:reindex' +alias minf='bin/magento indexer:info' +alias mid='bin/magento indexer:disable' +alias mien='bin/magento indexer:enable' + +# Maintenance +alias mmt='bin/magento maintenance:enable' +alias mmf='bin/magento maintenance:disable' + +# Admin +alias mrp='bin/magento admin:reset-password' + +# Queue +alias mqs='bin/magento queue:consumers:start' + +# Logs +alias mlog='tail -f var/log/*.log' +alias mslog='tail -f var/log/system.log' +alias melog='tail -f var/log/exeption.log' + +# Custom +alias mperm='chmod -R 777 var pub generated vendor app/etc' +alias mmode='bin/magento deploy:mode:show' +alias mmset='bin/magento deploy:mode:set' + +# Deployment +alias mms='bin\magento module:status' +alias mme='bin\magento module:enable' +alias mmd='bin\magento module:disable' +alias ml='bin\magento list' +alias mac='bin\magento a:u:c' +alias mau='bin\magento a:u:u' +alias maurl='bin/magento i:a'