feat: native autocomplete for console and composer#493
Merged
fabpot merged 2 commits intosymfony-cli:mainfrom Jul 12, 2024
Merged
feat: native autocomplete for console and composer#493fabpot merged 2 commits intosymfony-cli:mainfrom
console and composer#493fabpot merged 2 commits intosymfony-cli:mainfrom
Conversation
58824ce to
db7d613
Compare
Contributor
|
Testing on Fish. If |
Member
Author
|
@fabpot thank you for the feedback. I remember implementing a check for this at some point but I guess I dropped it by mistake during some refacto 🤷 . Going to have a look this week. |
…he console binary is not found
Member
Author
|
@fabpot I just pushed a fix when I now properly check for the |
Contributor
|
Thank you @tucksaun |
This was referenced Jul 16, 2024
javiereguiluz
added a commit
to symfony/symfony-docs
that referenced
this pull request
Jul 22, 2024
This PR was submitted for the 7.1 branch but it was merged into the 5.4 branch instead. Discussion ---------- Document Symfony CLI autocompletion I recently implemented autocompletion for any tools based on [symfony-cli/console](https://github.com/symfony-cli/console) including Symfony CLI (see symfony-cli/console#11). I also added completion forwarding for `composer` and `console` (see symfony-cli/symfony-cli#493). This means that you can have the autocompletion for the 3 tools by following `symfony completion --help` instructions and that it will automatically use the right configuration (ie. PHP version, `php.ini`, etc) when running it. Note: I opened the PR against `7.1` but technically this is not related to any `Symfony version`, let me know if you want me to change the target version. Commits ------- 52f1f00 Document Symfony CLI autocompletion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This PR adds « native » autocompletion for
consoleandcomposercommands.By « native » I mean that this replaces the need for some shell sorcery (effectively replacing symfony/symfony#57371).
In order to make this work I partially ported the Symfony shell autocompletion wrapper code in go, where I prepare what is necessary to call Symfony’s (or Composer)
_completecommand.Marking as draft while I open the PR to console about
GuessShell