Skip to content

Add tab completions to coder ssh #20158

Closed

Description

@ethanndickson

Currently, Coder CLI completions can be installed using coder completion. Right now this supports all commands and flags, but not any arguments or flag values.

However, we can also supply a custom CompletionHandler to the coder ssh command that will populate the autocomplete suggestions with a list of all agents owned by the currently logged in user.

coder ssh supports lots of formats so these completions will need to decide on just one, such as <workspace>.<agent>.
However, <workspace> aliases should also be added to the list for single-agent workspaces, since most workspaces are single-agent.

e.g.

$ coder ssh<TAB>
golang-dev
react
testing.backend
testing.db

Related to #14986, where tab completion support for ssh coder.<TAB> was removed with the introduction of the wildcard ssh config.

Activity

  1. changed the title [-]Add tabs completion to `coder ssh`[/-] [+]Add tab completions to `coder ssh`[/+] on Oct 3, 2025
  2. github-actions commented on Oct 3, 2025

    @github-actions
    Contributor
  3. added a commit that references this issue on Oct 27, 2025
    9780d02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions