Skip to content

Project name completion only works for projects with pending tasks #265

@fdela

Description

@fdela

Describe the bug
When trying to autocomplete project (using e.g. (a)dd, (m)odify or (p)roject command), only projects which have at least one pending task are available (tested in next and all reports).

To Reproduce
Try to change a task project using m or p autocomplete, and hit tab key repeatedly to try and find a project which has currently no pending task.
In provided test case, p2 has a pending task, while p1 and p2.sub have none.

Expected behavior
Autocomplete should show all available project names, whether they currently have any pending task or not, upon hitting tab key repeatedly.
In provided test case, p1, p2 and p2.sub should be available (and possibly empty string).

Test case
project-name-completion.sh.txt

Notes

  • task rc.list.all.projects=yes _projects can be used to retrieve the full list of used projects in a TaskWarrior backward-compatible way (tested with 2.4.4 and 2.5.1).
  • This would also be consistent with tag completion behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions