GothenburgBitFactory / GothenburgBitFactory/taskwarrior

Subcommand auto-completion misses trailing space

Open
#3,919 3 comments 0 reactions 0 assignees View on GitHub
topic:autocomplete type:bug
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

### Description:

When auto-completing partially filled subcommands with ``, the subcommand is completed, but in case of unique subcommand options, no trailing space is added after the subcommand.

### Steps to reproduce:

1. Write `task gh` and press ``
2. Write `task ann` and press ``

### Expected results:

1. Command expands to `task ghistory`, with no trailing space, given that subcommand completion has multiple options (`ghistory.annual`, `ghistory.daily`, etc) *(Actually, a trailing period `.` could also be added, but this is a rather niche use-case.)*
2. Command expands to `task annotate `, with trailing space, given that there are no multiple subcommand options available.

### Actual results:

1. Command expands to `task ghistory`, with no trailing space, as expected.
2. Command expands to `task annotate`, with no trailing space, and user has to hit space before writing the `` text.

### Remarks:

I understand there are subcommands or filters that can be compounded (`description.contains`, `due.before`, etc), where adding a trailing space is not desired, but for the above example and some other subcommands it doesn't seem to be the case.

### Version:

3.4.1.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.