Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nathanjcochran
Copy link
Collaborator

@nathanjcochran nathanjcochran commented Nov 3, 2025

This PR makes a few improvements to argument handling/validation:

  • Ensures all commands have the Args field set, which ensures that cobra validates the number of arguments provided.
  • Ensures all commands have either ValidArgs or ValidArgsFunction set, which allows cobra to correctly handle shell completions. For many commands, this is being set to NoFileCompletions, which just prevents the shell from automatically providing file names are completions.
  • Adds a new completion function for config options for the tiger config set and tiger config unset commands.
  • Updates the service ID completion function to only complete the first positional argument, and to always prevent file completions.
  • Consolidates the argument parsing logic for commands that expect a single service ID (or pull it from the config, if not specified explicitly).

@nathanjcochran nathanjcochran self-assigned this Nov 3, 2025
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