From f4e97088c9fdd5a85e9fa945cbb1e58488ff3559 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Mon, 18 Oct 2021 11:33:21 -0700 Subject: [PATCH 1/6] Add Acquia CLI (acli) to default tools https://github.com/bamarni/symfony-console-autocomplete/issues/66 https://github.com/bamarni/symfony-console-autocomplete/pull/67 --- src/DumpCommand.php | 1 + tests/fixtures/bash/default.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/src/DumpCommand.php b/src/DumpCommand.php index a748b9d..182d7e4 100644 --- a/src/DumpCommand.php +++ b/src/DumpCommand.php @@ -50,6 +50,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } else { $tools = array( 'console', + 'acli', 'composer', 'php-cs-fixer', 'phpspec', diff --git a/tests/fixtures/bash/default.txt b/tests/fixtures/bash/default.txt index c574310..da2497f 100644 --- a/tests/fixtures/bash/default.txt +++ b/tests/fixtures/bash/default.txt @@ -43,6 +43,7 @@ _symfony() } complete -o default -F _symfony console +complete -o default -F _symfony acli complete -o default -F _symfony composer complete -o default -F _symfony php-cs-fixer complete -o default -F _symfony phpspec From 84334edb82016727ff2b51d9b5be4de1d73f4889 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Tue, 19 Oct 2021 12:28:30 -0700 Subject: [PATCH 2/6] Update README Add Acquia CLI to list of supported tools, and reword sections to make it clear that only tools named console or on the list of default tools are supported out of the box https://github.com/bamarni/symfony-console-autocomplete/pull/67 https://github.com/bamarni/symfony-console-autocomplete/issues/66 --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3d8095b..d987274 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Enables shell autocompletion for tools based on the Notably, the composer global bin directory needs to be in your path. See https://getcomposer.org/doc/03-cli.md#global for instructions on how todo that. * If you're using bash, you'll have to make sure [programmable completion functions](https://github.com/scop/bash-completion) are available. Linux distributions usually ship it and enable it by default. On Mac OSX, you can install it with brew (`brew install bash-completion`) and enable it by adding `source $(brew --prefix)/etc/bash_completion` at the end of your `.bashrc`. +* If you wish to use a Console-based tool with an entrypoint name something other than `console` (i.e. Composer), ensure it’s in the list of [supported tools](#supported-tools), or open a PR to add it to the list. ## Installation @@ -103,10 +104,12 @@ A solution is to supply the `SHELL` environment variable as part of the `docker ## Supported tools -All tools using the Symfony Console component are supported, -here is a non-exhaustive list : +Any tool using the Symfony Console component and default `console` entrypoint is supported. + +Additionally, the following tools with custom-named entrypoints are supported: * composer +* [Acquia CLI (acli)](https://github.com/acquia/cli) * php-cs-fixer * behat * phpspec From 5c18bac54d1f0d38e4ad61a17038e0651be96f3e Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Wed, 20 Oct 2021 09:33:15 -0700 Subject: [PATCH 3/6] Alphabetize all the things --- README.md | 18 +++++++++--------- src/DumpCommand.php | 10 +++++----- tests/fixtures/bash/default.txt | 11 ++++++----- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index d987274..5d55119 100644 --- a/README.md +++ b/README.md @@ -108,13 +108,13 @@ Any tool using the Symfony Console component and default `console` entrypoint is Additionally, the following tools with custom-named entrypoints are supported: -* composer +* [Composer](https://getcomposer.org/) * [Acquia CLI (acli)](https://github.com/acquia/cli) -* php-cs-fixer -* behat -* phpspec -* robo -* deployer -* laravel artisan -* roadiz -* magento 2 console +* [Behat](https://docs.behat.org/en/latest/) +* [Deployer](https://deployer.org/) +* [Laravel Artisan](https://laravel.com/docs/8.x/artisan) +* [Magento 2 console](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/cli-cmds/cli-howto.html) +* [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) +* [phpspec](http://www.phpspec.net/en/stable/) +* [Roadiz](https://www.roadiz.io/) +* [Robo](https://github.com/consolidation/Robo) diff --git a/src/DumpCommand.php b/src/DumpCommand.php index 182d7e4..d15ca46 100644 --- a/src/DumpCommand.php +++ b/src/DumpCommand.php @@ -51,15 +51,15 @@ protected function execute(InputInterface $input, OutputInterface $output): int $tools = array( 'console', 'acli', + 'artisan', + 'behat', 'composer', + 'dep', + 'magento', 'php-cs-fixer', 'phpspec', - 'behat', - 'robo', - 'dep', - 'artisan', 'roadiz', - 'magento', + 'robo', ); } diff --git a/tests/fixtures/bash/default.txt b/tests/fixtures/bash/default.txt index da2497f..592d988 100644 --- a/tests/fixtures/bash/default.txt +++ b/tests/fixtures/bash/default.txt @@ -44,12 +44,13 @@ _symfony() complete -o default -F _symfony console complete -o default -F _symfony acli +complete -o default -F _symfony artisan +complete -o default -F _symfony behat complete -o default -F _symfony composer +complete -o default -F _symfony dep +complete -o default -F _symfony magento complete -o default -F _symfony php-cs-fixer complete -o default -F _symfony phpspec -complete -o default -F _symfony behat -complete -o default -F _symfony robo -complete -o default -F _symfony dep -complete -o default -F _symfony artisan complete -o default -F _symfony roadiz -complete -o default -F _symfony magento +complete -o default -F _symfony robo + From 5b49dbc8d173c6449e0e46cd52503d34521ebc38 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 21 Oct 2021 10:34:59 -0700 Subject: [PATCH 4/6] adjust wording --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5d55119..6840855 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,6 @@ Enables shell autocompletion for tools based on the Notably, the composer global bin directory needs to be in your path. See https://getcomposer.org/doc/03-cli.md#global for instructions on how todo that. * If you're using bash, you'll have to make sure [programmable completion functions](https://github.com/scop/bash-completion) are available. Linux distributions usually ship it and enable it by default. On Mac OSX, you can install it with brew (`brew install bash-completion`) and enable it by adding `source $(brew --prefix)/etc/bash_completion` at the end of your `.bashrc`. -* If you wish to use a Console-based tool with an entrypoint name something other than `console` (i.e. Composer), ensure it’s in the list of [supported tools](#supported-tools), or open a PR to add it to the list. ## Installation @@ -40,6 +39,8 @@ Add the following line at the end of your shell configuration file (`~/.bash_pro Close / re-open your terminal window and you're ready to go! +Note that quick setup only works for [supported tools](#supported-tools). + ## Static setup If you don't like all the magic from the quick setup and want to go with a more standard way, @@ -104,9 +105,9 @@ A solution is to supply the `SHELL` environment variable as part of the `docker ## Supported tools -Any tool using the Symfony Console component and default `console` entrypoint is supported. +All tools using the Symfony Console component are supported. -Additionally, the following tools with custom-named entrypoints are supported: +However, [quick setup](#quick-setup) only works if the entrypoint is named `console` or in the following list of tools: * [Composer](https://getcomposer.org/) * [Acquia CLI (acli)](https://github.com/acquia/cli) From 359a7fa9633f43b23df3bfdbd99df176bc84ee76 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 21 Oct 2021 11:46:31 -0700 Subject: [PATCH 5/6] alphabetize readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6840855..7c419a6 100644 --- a/README.md +++ b/README.md @@ -109,9 +109,9 @@ All tools using the Symfony Console component are supported. However, [quick setup](#quick-setup) only works if the entrypoint is named `console` or in the following list of tools: -* [Composer](https://getcomposer.org/) * [Acquia CLI (acli)](https://github.com/acquia/cli) * [Behat](https://docs.behat.org/en/latest/) +* [Composer](https://getcomposer.org/) * [Deployer](https://deployer.org/) * [Laravel Artisan](https://laravel.com/docs/8.x/artisan) * [Magento 2 console](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/cli-cmds/cli-howto.html) From c28782e7cbf3d44d19b273da0868f5e63500cfa4 Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Thu, 21 Oct 2021 11:51:43 -0700 Subject: [PATCH 6/6] fix tests? --- tests/fixtures/bash/default.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/fixtures/bash/default.txt b/tests/fixtures/bash/default.txt index 592d988..15ac9cc 100644 --- a/tests/fixtures/bash/default.txt +++ b/tests/fixtures/bash/default.txt @@ -53,4 +53,3 @@ complete -o default -F _symfony php-cs-fixer complete -o default -F _symfony phpspec complete -o default -F _symfony roadiz complete -o default -F _symfony robo -