feat(cli): add advanced command hint to help output#102
feat(cli): add advanced command hint to help output#102reubeno merged 3 commits intomicrosoft:mainfrom
Conversation
Add a hint at the bottom of `azldev --help` pointing users to the hidden `advanced` command group, which contains essential tools (mock, mcp, wget). This improves discoverability without fully unhiding the advanced commands. Closes microsoft#33
@microsoft-github-policy-service agree |
|
@Kelvinoppong Thanks for the PR! We appreciate your contribution. We've unblocked the PR checks and will monitor them. Edited: looks like a spacing issue in the snapshot files? |
…pace Move the advanced command hint from a help function wrapper (fmt.Fprintln) into cobra's usage template via SetUsageTemplate. The previous approach wrote outside the template system, so DisableExtraNewlines could not control trailing whitespace consistently across environments.
|
@reubeno Thanks for reviewing! You're right, there was a trailing whitespace inconsistency in the snapshot files. The root cause was that the original implementation used fmt.Fprintln inside a help function wrapper, which wrote outside cobra's template system. This meant stylishcobra.DisableExtraNewlines() couldn't control the trailing whitespace consistently across environments (local vs CI). I've fixed this by embedding the hint directly into cobra's usage template via SetUsageTemplate, so DisableExtraNewlines() now handles all trailing whitespace uniformly. The snapshot files have been updated to match. All local tests pass, and the container snapshots have been manually aligned to the same format. Ready for re-review when you get a chance |
reubeno
left a comment
There was a problem hiding this comment.
I like the new approach of updating the help template. Changes look good to me; will just be watching PR checks.
Thanks for the review. All PR checks have passed now. Appreciate you unblocking and keeping an eye on them |
Summary
azldev --helpoutput:Use "azldev advanced --help" for additional tools (mock, mcp, wget).advancedcommand group without fully unhiding itCloses #33
Test plan
mage unitpassesmage check allpasses