Compile effective flag aliases during installation

This commit is contained in:
2026-10-19 17:33:39 +00:00
parent 2ab87e9333
commit 6ea8c4dd3f
6 changed files with 518 additions and 12 deletions

View File

@@ -58,8 +58,8 @@ func TestRoutingRuleFactoriesCaptureNormalizedValues(t *testing.T) {
if globalRule.record.targetFlag != (capturedFlagSpelling{name: "c", short: true}) {
t.Fatalf("target spelling = %#v", globalRule.record.targetFlag)
}
scopedRule := FlagAliasFor("group show", "-f", "--format")
if got, want := scopedRule.record.scopePath.String(), "group show"; got != want {
scopedRule := FlagAliasFor(" new\t", "-f", "--help")
if got, want := scopedRule.record.scopePath.String(), "new"; got != want {
t.Fatalf("scope path = %q, want %q", got, want)
}