Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v10] Alias support for tsh (#13305, #14931) #14919

Merged
merged 9 commits into from
Aug 17, 2022
Merged

Conversation

Tener
Copy link
Contributor

@Tener Tener commented Jul 27, 2022

Backport #13305 and #14931 to v10


  • aliases are read from global and user configs.
  • we prevent Kingpin from terminating tsh; we handle parsing errors better.
  • added support for TELEPORT_DEBUG env variable, changed how logging is initialized.
  • debugging aliases is possible via TELEPORT_DEBUG=1 env variable; --debug is ineffective as it comes into play too late.
  • if alias definition calls tsh, we call the Run() function directly instead of spawning fresh tsh; this improves the UX.
  • alias loops are detected and a proper error is shown.
  • all flags are made repeatable; if only one value for a given flag is possible, the last instance of the flag will be effective.

Document tsh aliases usage. Change implementation details. (#14931)

  • Document tsh aliases usage.

  • Rename: TSH_ALIAS => TSH_UNALIAS

  • Support $TSH variable in alias definitions.

  • Document $TSH in tsh aliases.

* aliases are read from global and user configs.
* we prevent Kingpin from terminating `tsh`; we handle parsing errors better.
* added support for `TELEPORT_DEBUG` env variable, changed how logging is initialized.
* debugging aliases is possible via `TELEPORT_DEBUG=1` env variable; `--debug` is ineffective as it comes into play too late.
* if alias definition calls `tsh`, we call the `Run()` function directly instead of spawning fresh `tsh`; this improves the UX.
* alias loops are detected and a proper error is shown.
* all flags are made repeatable; if only one value for a given flag is possible, the last instance of the flag will be effective.

Co-authored-by: Marek Smoliński <marek@goteleport.com>
@github-actions github-actions bot added the tsh tsh - Teleport's command line tool for logging into nodes running Teleport. label Jul 27, 2022
@Tener Tener added the backport label Jul 27, 2022
@Tener
Copy link
Contributor Author

Tener commented Jul 28, 2022

Note: this PR is on hold as implementation is being discussed #14931.

Tener and others added 4 commits August 11, 2022 10:40
* Document `tsh` aliases usage.

* Rename: `TSH_ALIAS` => `TSH_UNALIAS`

* Support $TSH variable in alias definitions.

* Document `$TSH` in tsh aliases.

* Apply suggestions from code review

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Roman Tkachenko <roman@goteleport.com>
Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
@Tener Tener changed the title [v10] Alias support for tsh (#13305) [v10] Alias support for tsh (#13305, #14931) Aug 17, 2022
@Tener Tener enabled auto-merge (squash) August 17, 2022 09:42
@Tener Tener merged commit f19437d into branch/v10 Aug 17, 2022
@Tener Tener deleted the tener/v10/backport-13305 branch August 17, 2022 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport tsh tsh - Teleport's command line tool for logging into nodes running Teleport.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants