Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Console] Document console completion #16723

Merged
merged 1 commit into from
Apr 21, 2022
Merged

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Apr 16, 2022

Fixes #15947

I couldn't resist rewriting the Console document a bit, to structure it more like "Usage" and "Implementing a custom command". This created a nice place to talk about setting up completion.

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouter, thanks for adding the docs of this lovely feature!

console.rst Outdated Show resolved Hide resolved
console/input.rst Show resolved Hide resolved
page_creation.rst Outdated Show resolved Hide resolved
@wouterj wouterj merged commit f679e20 into symfony:5.4 Apr 21, 2022
@wouterj wouterj deleted the console-completion branch April 21, 2022 13:40
@GromNaN
Copy link
Member

GromNaN commented Apr 21, 2022

Thank you @wouterj. Do you think this page should be updated for 6.1 with the new features: fish completion symfony/symfony#43641 and configuration in option/argument définition symfony/symfony#44948


// complete the input with "Fa" as input
$suggestions = $tester->complete(['Fa']);
$this->assertSame(['Fabien', 'Fabrice'], $suggestions);
Copy link
Member

@GromNaN GromNaN Apr 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users will think they need to filter the values themself, while this is done by the completion tool.
I think getCompletionValue usage is rare and reserved to cases when the list of values is too long (like the list of all packages on packagist composer/composer#10320 (comment))

@wouterj
Copy link
Member Author

wouterj commented Apr 21, 2022

Do you think this page should be updated for 6.1 with the new features

Yes, see #16724 (would be great to get your review there)

wouterj added a commit that referenced this pull request May 1, 2022
This PR was merged into the 6.1 branch.

Discussion
----------

[Console] Document completion changes for 6.1

Fixes #16623 and fixes #16231
Includes #16723 (I'll rebase after that one is merged)

Commits
-------

1878694 Document input definition completion and Fish support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Console] Bash completion integration
4 participants