Fish completion breaks if task description have colon (:
)
#2101
Labels
area: completions
Changes related to shell completions and scripts.
:
)
#2101
Description
Summary
The fish completion is broken when colon exists in task description.
Detail
When task descriptions contain colons (
:
), the fish shell completion breaks due to incorrectsed
scripts. Additionally,sed
behaves differently across environments, which further complicates the issue. By using fish scripts instead ofsed
, we can write more robust and maintainable completion scripts.Environment:
Steps to Reproduce
The issue can be reproduced using the following
Taskfile.yml
:Taskfile.yml
Before
colon
,colon:alias
,colon-s
, andcolon-s:alias
are broken.task and desc with spaces: and a colon
is also broken.After
I attempted to fix the issue in my forked repository:
https://github.com/ikura-hamu/task
colon
,colon:alias
,colon-s
, andcolon-s:alias
now work correctly.task and desc with spaces: and a colon
is still broken.task with spaces: and a colon
is now broken.Discussion
I believe that tasks with both colons and spaces in their names are rare, as they are inconvenient to type and look somewhat messy in definitions. Therefore, my fix should work well for most users.
Would it be acceptable to merge this fix even though it does not fully resolve the issue for task names containing both spaces and colons? Or would you prefer a more comprehensive solution?
Version
3.41.0
Operating system
Ubuntu 22.04
Experiments Enabled
No response
Example Taskfile
The text was updated successfully, but these errors were encountered: