Skip to content

cli: improve autocompletions for various commands#27506

Merged
tgross merged 1 commit intomainfrom
autocomplete-improvements-misc
Feb 17, 2026
Merged

cli: improve autocompletions for various commands#27506
tgross merged 1 commit intomainfrom
autocomplete-improvements-misc

Conversation

@tgross
Copy link
Copy Markdown
Member

@tgross tgross commented Feb 13, 2026

Some commands are missing autocompletion flags for specific fields, have completions for flags that are deprecated or no longer exist, have the wrong predictor, or don't perform searches for argument completions for objects from state.

This is one of three batches of work to improve autocompletions, focusing on a miscellaneous set of commands.

Generative AI disclosure: as part of an ongoing pilot, this changeset was partially generated via Claude Code with the exception of the code reuse refactoring and minor touch-ups. Reviewed and tested manually, with commit description written by human for humans.

Ref: #27507
Ref: #27505

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
    • as this is a UX improvement, this was tested manually
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad product documentation, which is stored in the
    web-unified-docs repo. Refer to the web-unified-docs contributor guide for docs guidelines.
    Please also consider whether the change requires notes within the upgrade
    guide
    . If you would like help with the docs, tag the nomad-docs team in this PR.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.
  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Some commands are missing autocompletion flags for specific fields, have
completions for flags that are deprecated or no longer exist, have the wrong
predictor, or don't perform searches for argument completions for objects from
state.

This is one of three batches of work to improve autocompletions, focusing on a
miscellaneous set of commands.

Generative AI disclosure: as part of an ongoing pilot, this changeset was
partially generated via Claude Code with the exception of the code reuse
refactoring and minor touch-ups. Reviewed and tested manually, with commit
description written by human for humans.
Copy link
Copy Markdown
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread .changelog/27506.txt
@@ -0,0 +1,3 @@
```release-note:improvement
cli: Improved options autocompletions for various commands
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we wanted to point of what grouping of commands, so the changelog entry doesn't clash with the other PR's in this piece of work.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#27505 is new autocompletions where they didn't exist before, whereas #27507 overlaps with this one a lot and the division was fairly arbitrary for keeping review size down. I sort of intended for this changelog entry to cover both this and #27507 which is why I kept this vague rather than listing dozens of commands. What do you think?

@tgross tgross merged commit d05aa45 into main Feb 17, 2026
46 checks passed
@tgross tgross deleted the autocomplete-improvements-misc branch February 17, 2026 15:10
tgross added a commit that referenced this pull request Feb 17, 2026
Some commands are missing autocompletion flags for specific fields, have
completions for flags that are deprecated or no longer exist, have the wrong
predictor, or don't perform searches for argument completions for objects from
state.

This is one of three batches of work to improve autocompletions, focusing on a
miscellaneous set of commands.

Generative AI disclosure: as part of an ongoing pilot, this changeset was
partially generated via Claude Code with the exception of the code reuse
refactoring and minor touch-ups. Reviewed and tested manually, with commit
description written by human for humans.
tgross added a commit that referenced this pull request Feb 17, 2026
#27532)

Some commands are missing autocompletion flags for specific fields, have
completions for flags that are deprecated or no longer exist, have the wrong
predictor, or don't perform searches for argument completions for objects from
state.

This is one of three batches of work to improve autocompletions, focusing on a
miscellaneous set of commands.

Generative AI disclosure: as part of an ongoing pilot, this changeset was
partially generated via Claude Code with the exception of the code reuse
refactoring and minor touch-ups. Reviewed and tested manually, with commit
description written by human for humans.

Co-authored-by: Tim Gross <tgross@hashicorp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants