Skip to content

feat(cli): add shell completions - #14341

Merged
ethanndickson merged 1 commit into
mainfrom
ethan/completions
Aug 20, 2024
Merged

feat(cli): add shell completions#14341
ethanndickson merged 1 commit into
mainfrom
ethan/completions

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Aug 19, 2024

Copy link
Copy Markdown
Member

Adds a command to install shell completions for the detected or otherwise chosen shell, coder completion.

  • Enum and enum array flags now display their type in help commands and auto-generated documentation as Val1|Val2|... and [Val1|Val2|...] respectively, instead of just string or string-array.
  • To reuse a dependency introduced in serpent, the configssh file is replaced using WriteFile from natefinch/atomic.
  • Table columns struct tags have been unified to always use spaces over underscores. The table formatter previously accepted both, but always displayed the headers using spaces. The change was made to support providing completions, and validating, the --column flag on commands with a table output.

Future

  • Use a new coder/serpent release instead of a specific commit.

Closes #13502.

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ethanndickson and the rest of your teammates on Graphite Graphite

@ammario
ammario removed their request for review August 19, 2024 16:57
Comment thread cli/configssh.go
Comment thread cli/templateedit.go Outdated
Comment thread cli/testdata/coder_templates_versions_list_--help.golden Outdated
Comment thread enterprise/cli/testdata/coder_features_list_--help.golden Outdated
Comment thread cli/completion.go Outdated
@ethanndickson
ethanndickson merged commit 0b2ba96 into main Aug 20, 2024
@ethanndickson
ethanndickson deleted the ethan/completions branch August 20, 2024 04:47
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide completions for the coder CLI

2 participants