Skip to content

Add completion spec: Teleport (tsh)#216

Merged
lucieleblanc merged 3 commits into
mainfrom
app-3504/command-spec-tsh
Apr 3, 2026
Merged

Add completion spec: Teleport (tsh)#216
lucieleblanc merged 3 commits into
mainfrom
app-3504/command-spec-tsh

Conversation

@lucieleblanc
Copy link
Copy Markdown
Contributor

@lucieleblanc lucieleblanc commented Apr 1, 2026

Summary

Adds native Rust generators for the Teleport tsh completion spec, replacing the Fig-style JavaScript generators that were previously ignored by Warp.

Changes

New generators (command-signatures/src/generators/tsh.rs):

  • nodes: Runs tsh ls --format=json and parses the JSON output to provide SSH host/node completions for tsh ssh <TAB>
  • clusters: Runs tsh clusters --format=json to provide cluster name completions for the --proxy option
  • status_user: Runs tsh status --format json to provide the current user for the --user option

Updated spec (command-signatures/json/tsh.json):

  • Replaced all generators objects (with script/postProcess JavaScript) with generatorName string references pointing to the new Rust generators

Registration (command-signatures/src/generators/mod.rs):

  • Added mod tsh and registered tsh::generator() in dynamic_command_signature_data()

Testing

All presubmit checks pass (prettier, cargo fmt, cargo clippy, cargo test).

Generator Verification Screenshots

tsh ssh <TAB> — nodes generator (shows Teleport node hostname with "Access expires" description):
tsh ssh completions

tsh --proxy <TAB> — clusters generator (shows "test-cluster" from Teleport):
tsh proxy completions

tsh --user <TAB> — status_user generator (shows "testuser" from active session):
tsh user completions

Closes APP-3504

Conversation: https://staging.warp.dev/conversation/040e9b82-01b8-44de-9f66-f5d3571a7721
Run: https://oz.staging.warp.dev/runs/019d4aa7-6691-7e76-b76b-ace16b7eeb66

This PR was generated with Oz.

Replace Fig-style JavaScript generators with native Rust generators for
the tsh completion spec. Three generators are added:

- nodes: Parses 'tsh ls --format=json' for SSH host completion
- clusters: Parses 'tsh clusters --format=json' for --proxy option
- status_user: Parses 'tsh status --format json' for --user option

Closes APP-3504

Co-Authored-By: Oz <oz-agent@warp.dev>
@linear
Copy link
Copy Markdown

linear Bot commented Apr 1, 2026

APP-3504 Add dynamic host/node completion for Teleport (tsh)

Spec exists but lacks dynamic host/node generators. tsh ssh <TAB> doesn't trigger completions; the SSH wrapper doesn't activate for Teleport sessions.

See GitHub #4067

@lucieleblanc
Copy link
Copy Markdown
Contributor Author

Screenshots were initially uploaded in the commit; I checked them and removed them, which is why they now appear as broken links.

@lucieleblanc lucieleblanc marked this pull request as ready for review April 1, 2026 21:02
@lucieleblanc lucieleblanc merged commit 814230e into main Apr 3, 2026
3 checks passed
@lucieleblanc lucieleblanc deleted the app-3504/command-spec-tsh branch April 3, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants