close
Skip to content

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

@antonrademaker

Description

@antonrademaker

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

Metadata

Metadata

Assignees

Labels

7.0Cost:MWork that requires one engineer up to 2 weeksPriority:1Work that is critical for the release, but we could probably ship withoutUser StoryA single user-facing feature. Can be grouped under an epic.parent:1240372triagedThe issue was evaluated by the triage team, placed on correct area, next action defined.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions