Add completion spec: Teleport (tsh)#216
Merged
Merged
Conversation
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>
APP-3504 Add dynamic host/node completion for Teleport (tsh)
Spec exists but lacks dynamic host/node generators. See GitHub #4067 |
Co-Authored-By: Oz <oz-agent@warp.dev>
Contributor
Author
|
Screenshots were initially uploaded in the commit; I checked them and removed them, which is why they now appear as broken links. |
peicodes
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds native Rust generators for the Teleport
tshcompletion spec, replacing the Fig-style JavaScript generators that were previously ignored by Warp.Changes
New generators (
command-signatures/src/generators/tsh.rs):nodes: Runstsh ls --format=jsonand parses the JSON output to provide SSH host/node completions fortsh ssh <TAB>clusters: Runstsh clusters --format=jsonto provide cluster name completions for the--proxyoptionstatus_user: Runstsh status --format jsonto provide the current user for the--useroptionUpdated spec (
command-signatures/json/tsh.json):generatorsobjects (withscript/postProcessJavaScript) withgeneratorNamestring references pointing to the new Rust generatorsRegistration (
command-signatures/src/generators/mod.rs):mod tshand registeredtsh::generator()indynamic_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 --proxy <TAB>— clusters generator (shows "test-cluster" from Teleport):tsh --user <TAB>— status_user generator (shows "testuser" from active session):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.