Skip to content

Commit

Permalink
Fixed #7: Add Magento2 Enterprise Edition Completion File
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaroslav Voronoy committed Dec 13, 2016
1 parent aca07e8 commit 671c0af
Showing 1 changed file with 117 additions and 0 deletions.
117 changes: 117 additions & 0 deletions magento2-bash-completion-enterprise
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
_magento2()
{
local cur opts first_word
COMPREPLY=()
_get_comp_words_by_ref -n : cur words
for word in ${words[@]:1}; do
if [[ $word != -* ]]; then
first_word=$word
break
fi
done
opts="help list admin:user:create admin:user:unlock cache:clean cache:disable cache:enable cache:flush cache:status catalog:images:resize catalog:product:attributes:cleanup cron:run customer:hash:upgrade deploy:mode:set deploy:mode:show dev:source-theme:deploy dev:tests:run dev:urn-catalog:generate dev:xml:convert i18n:collect-phrases i18n:pack i18n:uninstall indexer:info indexer:reindex indexer:reset indexer:set-mode indexer:show-mode indexer:status info:adminuri info:backups:list info:currency:list info:dependencies:show-framework info:dependencies:show-modules info:dependencies:show-modules-circular info:language:list info:timezone:list maintenance:allow-ips maintenance:disable maintenance:enable maintenance:status module:disable module:enable module:status module:uninstall queue:consumers:list queue:consumers:start sampledata:deploy sampledata:remove sampledata:reset setup:backup setup:config:set setup:cron:run setup:db-data:upgrade setup:db-schema:add-slave setup:db-schema:split-quote setup:db-schema:split-sales setup:db-schema:upgrade setup:db:status setup:di:compile setup:install setup:performance:generate-fixtures setup:rollback setup:static-content:deploy setup:store-config:set setup:uninstall setup:upgrade support:backup:code support:backup:db support:utility:check support:utility:paths theme:uninstall"
case "$first_word" in
help)
opts="--xml --format --raw"
;; list)
opts="--xml --raw --format"
;; admin:user:create)
opts="--admin-user --admin-password --admin-email --admin-firstname --admin-lastname --magento-init-params"
;; cache:clean)
opts="--bootstrap"
;; cache:disable)
opts="--bootstrap"
;; cache:enable)
opts="--bootstrap"
;; cache:flush)
opts="--bootstrap"
;; cache:status)
opts="--bootstrap"
;; cron:run)
opts="--group --bootstrap"
;; deploy:mode:set)
opts="--skip-compilation"
;; dev:source-theme:deploy)
opts="--type --locale --area --theme"
;; dev:urn-catalog:generate)
opts="--ide"
;; dev:xml:convert)
opts="--overwrite"
;; i18n:collect-phrases)
opts="--output --magento"
;; i18n:pack)
opts="--mode --allow-duplicates"
;; i18n:uninstall)
opts="--backup-code"
;; info:dependencies:show-framework)
opts="--output"
;; info:dependencies:show-modules)
opts="--output"
;; info:dependencies:show-modules-circular)
opts="--output"
;; maintenance:allow-ips)
opts="--none --magento-init-params"
;; maintenance:disable)
opts="--ip --magento-init-params"
;; maintenance:enable)
opts="--ip --magento-init-params"
;; maintenance:status)
opts="--magento-init-params"
;; module:disable)
opts="--force --all --clear-static-content --magento-init-params"
;; module:enable)
opts="--force --all --clear-static-content --magento-init-params"
;; module:status)
opts="--magento-init-params"
;; module:uninstall)
opts="--remove-data --backup-code --backup-media --backup-db --clear-static-content --magento-init-params"
;; queue:consumers:start)
opts="--max-messages --area-code"
;; setup:backup)
opts="--code --media --db --magento-init-params"
;; setup:config:set)
opts="--backend-frontname --amqp-host --amqp-port --amqp-user --amqp-password --amqp-virtualhost --amqp-ssl --key --session-save --definition-format --db-host --db-name --db-user --db-engine --db-password --db-prefix --db-model --db-init-statements --skip-db-validation --http-cache-hosts --magento-init-params"
;; setup:cron:run)
opts="--magento-init-params"
;; setup:db-data:upgrade)
opts="--magento-init-params"
;; setup:db-schema:add-slave)
opts="--host --dbname --username --password --connection --resource"
;; setup:db-schema:split-quote)
opts="--host --dbname --username --password --connection --resource"
;; setup:db-schema:split-sales)
opts="--host --dbname --username --password --connection --resource"
;; setup:db-schema:upgrade)
opts="--magento-init-params"
;; setup:db:status)
opts="--magento-init-params"
;; setup:install)
opts="--backend-frontname --amqp-host --amqp-port --amqp-user --amqp-password --amqp-virtualhost --amqp-ssl --key --session-save --definition-format --db-host --db-name --db-user --db-engine --db-password --db-prefix --db-model --db-init-statements --skip-db-validation --http-cache-hosts --base-url --language --timezone --currency --use-rewrites --use-secure --base-url-secure --use-secure-admin --admin-use-security-key --admin-user --admin-password --admin-email --admin-firstname --admin-lastname --cleanup-database --sales-order-increment-prefix --use-sample-data --magento-init-params"
;; setup:performance:generate-fixtures)
opts="--skip-reindex"
;; setup:rollback)
opts="--code-file --media-file --db-file --magento-init-params"
;; setup:static-content:deploy)
opts="--dry-run --no-javascript --no-css --no-less --no-images --no-fonts --no-html --no-misc --no-html-minify --theme --exclude-theme --language --exclude-language --area --exclude-area --jobs"
;; setup:store-config:set)
opts="--base-url --language --timezone --currency --use-rewrites --use-secure --base-url-secure --use-secure-admin --admin-use-security-key --magento-init-params"
;; setup:uninstall)
opts="--magento-init-params"
;; setup:upgrade)
opts="--keep-generated --magento-init-params"
;; support:backup:code)
opts="--name --output --logs"
;; support:backup:db)
opts="--name --output --logs --ignore-sanitize"
;; support:utility:check)
opts="--hide-paths"
;; support:utility:paths)
opts="--force"
;; theme:uninstall)
opts="--backup-code --clear-static-content"
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
__ltrim_colon_completions "$cur"
}
complete -o default -F _magento2 magento

0 comments on commit 671c0af

Please sign in to comment.