Skip to content

Short prefix / namespace matching #2947

Description

@parijke

Description

Is your feature request related to a problem? Please describe.

Currently, users must type the exact task name or explicit aliases to run a task. In projects with large Taskfiles and namespaced tasks (e.g., api:openapi:export), typing full names is tedious during local development if explicit aliases haven't been manually defined for every command.

Describe the solution you'd like

Support Shortest Unique Prefix Matching (similar to Symfony Console or Git subcommand matching).

In the example a:o:e would match the task if unambiguous

Expected Behavior:

  1. Unique match: If the provided input unambiguously matches a single task prefix (e.g., running task api:o when only api:openapiexport exists), Task should execute it immediately.
  2. Ambiguous match: If the input matches multiple tasks, Task should halt execution and present a helpful suggestion list (similar to Symfony Console):
The prefix "doct" is ambiguous.
Did you mean one of these?
  - doctrine:database
  - doctrine:schema
  - doctrine:migrations

Maybe control this with a seeting, something like

options:
  prefix_matching: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: needs triageWaiting to be triaged by a maintainer.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions