Skip to content

Conversation

bittrance
Copy link
Contributor

What type of PR is this?

  • cleanup

What this PR does / why we need it:

This PR updates fish completions test suite to invoke setupCommandGraph(). This make the fish completion tests more realistic since ordinary execution will have performed this setup. Help commands that were removed in #2121 will now be generated the "correct" way in tests.

This also allows us to clean up helper method signatures by depending on command parent-child relations for various information needs. Since we are now juggling even more Command objects, I chose to make the helpers into free functions so there is no confusion with "self".

Finally, subcommand aliases are no longer listed as suggestions, only the canonical name. Completions after aliases still work as normal.

Which issue(s) this PR fixes:

None, but the cleanup prepares the way for #2115.

Special notes for your reviewer:

Best reviewed commit-by-commit.

Release Notes

Fish completions now suggest only the canonical sub-command name, no aliases.

bittrance added 2 commits May 5, 2025 20:42
This allows the completions to depend on parent-child relations,
making several method signatures simpler.
@bittrance bittrance requested a review from a team as a code owner May 5, 2025 21:32
@dearchap dearchap merged commit f5f433a into urfave:main May 10, 2025
9 checks passed
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