Skip to content

Add tab-completion of positional and named values #285

@seaneagan

Description

@seaneagan

Followup of #281 in support of #175.

For example assume we have:

@Task()
bump(
    @Positional(allowed: const ['major', 'minor', 'patch', 'build', 'release'])
    String releaseType) {
  new PubApp.global('den').run(['bump', releaseType]);
}

Then the user should get the following completions:

grind bump:[TAB]
major
minor
patch
build
release

And similarly for options:

@Task()
bump(
    {@Option(allowed: const ['major', 'minor', 'patch', 'build', 'release'])
    String releaseType: 'patch') {
  new PubApp.global('den').run(['bump', releaseType]);
}
grind:bump --release-type [TAB]
major
minor
patch
build
release

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions