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

Enable tab completion via CLI to System.CommandLine Migration #2191

Closed
18 of 19 tasks
antonrademaker opened this issue Dec 12, 2019 · 4 comments
Closed
18 of 19 tasks

Enable tab completion via CLI to System.CommandLine Migration #2191

antonrademaker opened this issue Dec 12, 2019 · 4 comments
Assignees
Labels
7.0 Cost:M Work that requires one engineer up to 2 weeks parent:1240372 Priority:1 Work that is critical for the release, but we could probably ship without triaged The issue was evaluated by the triage team, placed on correct area, next action defined. User Story A single user-facing feature. Can be grouped under an epic.
Milestone

Comments

@antonrademaker
Copy link

antonrademaker commented Dec 12, 2019

Dotnet cli supports tab completion, it would be really handy to have support for template parameters / symbols as well?

https://docs.microsoft.com/en-us/dotnet/core/tools/enable-tab-autocomplete

To allow tab completion, dotnet new CLI needs to migrate to System.CommandLine parser.

Subtasks

Done

Not started / moved to separate issues

  • consider creating TemplatePackageManager.GetTemplates version which uses cache only for tab completion and help
    • consider implementing non async version for GetTemplatePackage based on cache to be used in HandleAmbiguousTemplateGroup and HandleAmbiguousResult methods. At the moment help delegate is not async, also not possible to use async methods in renderer. [system-command-line] error handling for ambiguous results on template instantiation #4227 (comment)
      • default if option without value should not be parsed / validated at parser level. Instead the parser should just pass null in this case and TemplateCreator should handle this case properly. However if default if option without value is not set for parameter, having no value for option should not be allowed.
      • consider not parsing hex values on parser level. It's a specific format of current generator. Either utilize generator to see if value can be parsed or try to convert any value to hex in format needed by generator and fail if it's not possible.
      • points above should allow to remove custom parse logic for most cases.

Justification

Customer impact

  1. better and more intuitive CLI UX, including help
  2. enables tab completion
    Engineering impact
  3. removes dependency on old parser, requiring workarounds for source-build and separate repo maintanence costs
  4. easier cost of adding new commands and options for new features
@rainersigwald
Copy link
Member

Another upvote from Twitter: https://twitter.com/buhakmeh/status/1235581946853392386?s=20

cc @donJoseLuis

@donJoseLuis
Copy link
Contributor

we need to find the right place for this issue.

@donJoseLuis donJoseLuis added need-pm-discussion Need agreement from PM that the issue aligns to targeted stories for any of the next 2 releases triaged The issue was evaluated by the triage team, placed on correct area, next action defined. labels Mar 20, 2020
@vlada-shubina vlada-shubina added the Epic Groups multiple user stories. Can be grouped under a theme. label Sep 15, 2020
@donJoseLuis donJoseLuis added Priority:1 Work that is critical for the release, but we could probably ship without User Story A single user-facing feature. Can be grouped under an epic. and removed Epic Groups multiple user stories. Can be grouped under a theme. labels Dec 19, 2020
@donJoseLuis donJoseLuis changed the title Adding tab completion As a customer, I want tab completion support, to have a common CLI experience in templating Dec 19, 2020
@donJoseLuis donJoseLuis added Cost:M Work that requires one engineer up to 2 weeks parent:1240372 labels Dec 19, 2020
@vlada-shubina vlada-shubina added Epic Groups multiple user stories. Can be grouped under a theme. and removed need-pm-discussion Need agreement from PM that the issue aligns to targeted stories for any of the next 2 releases labels Jan 26, 2021
@vlada-shubina vlada-shubina modified the milestones: April Sprint, May Sprint Mar 3, 2021
@bekir-ozturk bekir-ozturk modified the milestones: April Sprint, May Sprint Apr 6, 2021
@vlada-shubina vlada-shubina added this to the May Sprint milestone Apr 6, 2021
@bekir-ozturk bekir-ozturk modified the milestones: May Sprint, June Sprint May 25, 2021
@vlada-shubina vlada-shubina changed the title As a customer, I want tab completion support, to have a common CLI experience in templating New CLI parser + tab completion May 31, 2021
@vlada-shubina vlada-shubina removed this from the September Sprint milestone Jun 30, 2021
@donJoseLuis
Copy link
Contributor

donJoseLuis commented Apr 6, 2022

Discussion:

May also resolve:

Blocks:

@donJoseLuis donJoseLuis changed the title Migrate CLI to System.CommandLine and enable tab completion Enable tab completion via CLI to System.CommandLine Migration Apr 6, 2022
@donJoseLuis donJoseLuis added the 7.0 label Apr 6, 2022
@vlada-shubina vlada-shubina modified the milestones: Backlog, July 2022 Jul 14, 2022
@vlada-shubina
Copy link
Member

This effort is considered to be done. Outstanding items from description / comments are moved to separate issues and will be done later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.0 Cost:M Work that requires one engineer up to 2 weeks parent:1240372 Priority:1 Work that is critical for the release, but we could probably ship without triaged The issue was evaluated by the triage team, placed on correct area, next action defined. User Story A single user-facing feature. Can be grouped under an epic.
Projects
None yet
Development

No branches or pull requests

5 participants