-
-
Notifications
You must be signed in to change notification settings - Fork 774
Labels
area: uiChanges related to the UI of Task.Changes related to the UI of Task.state: working as intendedThe issue described is working as originally intended.The issue described is working as originally intended.
Description
When FORCE_COLOR=1 is set in the environment (common for users who want colored output from CLI tools), the zsh completion for task emits raw ANSI escape codes instead of clean task names.
Steps to reproduce
export FORCE_COLOR=1
task <Tab>Expected behavior
Clean completion list of task names
Actual behavior
Completion shows literal escape codes like $'\033'\[
Environment
- task version: 3.45.4
- Shell: zsh 5.9
- OS: macOS 14.x (Darwin)
Root cause
The __task_list() function in task --completion zsh runs task --list-all which respects FORCE_COLOR and emits colored output. The ANSI codes then leak into zsh's completion system.
Suggested fix
The completion script should either:
- Pass
--color=falsewhen calling task for completion, or - Wrap the call with
NO_COLOR=1/FORCE_COLOR=
Current workaround
Override __task_list() after compinit to use:
cmd=(env FORCE_COLOR= CLICOLOR_FORCE= NO_COLOR=1 task --color=false)Metadata
Metadata
Assignees
Labels
area: uiChanges related to the UI of Task.Changes related to the UI of Task.state: working as intendedThe issue described is working as originally intended.The issue described is working as originally intended.