Skip to content

Change the terminal title to include task name #2245

@jaskij

Description

@jaskij

Description

When working with multiple terminals (such as when using tmux), it's nice to know what's going on in each of them. Sadly, by default, the name is usually the name of the binary - which in this case tells us nothing, as they all simply display go-task.

The idea is for go-task to emit an escape sequence to stdout that includes the name of the task that was called on CLI. So if I run, say, go-task serve -something -or -other, my terminal's title would change to go-task serve, or just serve.

From my research, this is quite simple - it just needs a specific sequence printed to the standard output, \033]0;Title goes here\007.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions