From a8efedde818f0e62577c39c470c7419cc25de255 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Mon, 11 Mar 2024 12:55:11 -0600 Subject: [PATCH] fix: remove configured id from usage override (#1012) * fix: remove configured id from usage override * chore: update default build --- .git2gus/config.json | 4 ++-- src/help/command.ts | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.git2gus/config.json b/.git2gus/config.json index 62c66207b..02def521f 100644 --- a/.git2gus/config.json +++ b/.git2gus/config.json @@ -1,7 +1,7 @@ { "productTag": "a1aB0000000ce2IIAQ", - "defaultBuild": "offcore.tooling.55", - "issueTypeLabels": { "enhancement": "USER STORY", "bug": "BUG P3" }, + "defaultBuild": "offcore.tooling.60", + "issueTypeLabels": {"enhancement": "USER STORY", "bug": "BUG P3"}, "hideWorkItemUrl": true, "statusWhenClosed": "CLOSED" } diff --git a/src/help/command.ts b/src/help/command.ts index 8ddbef8cd..de5c21ce0 100644 --- a/src/help/command.ts +++ b/src/help/command.ts @@ -5,7 +5,7 @@ import {colorize} from '../cli-ux/theme' import {Command} from '../command' import * as Interfaces from '../interfaces' import {ensureArgObject} from '../util/ensure-arg-object' -import {toStandardizedId} from '../util/ids' +import {toConfiguredId, toStandardizedId} from '../util/ids' import {castArray, compact, sortBy} from '../util/util' import {DocOpts} from './docopts' import {HelpFormatter, HelpSection, HelpSectionRenderer} from './formatter' @@ -332,6 +332,7 @@ export class CommandHelp extends HelpFormatter { protected usage(): string { const {id, usage} = this.command const standardId = toStandardizedId(id, this.config) + const configuredId = toConfiguredId(id, this.config) const body = (usage ? castArray(usage) : [this.defaultUsage()]) .map((u) => { const allowedSpacing = this.opts.maxWidth - this.indentSpacing @@ -343,7 +344,7 @@ export class CommandHelp extends HelpFormatter { const commandDescription = colorize( this.config?.theme?.sectionDescription, - u.replace('<%= command.id %>', '').replace(standardId, '').trim(), + u.replace('<%= command.id %>', '').replace(standardId, '').replace(configuredId, '').trim(), ) const line = `${dollarSign} ${bin} ${command} ${commandDescription}`.trim()