Skip to content

Commit

Permalink
fix: remove configured id from usage override (#1012)
Browse files Browse the repository at this point in the history
* fix: remove configured id from usage override

* chore: update default build
  • Loading branch information
mdonnalley committed Mar 11, 2024
1 parent c1f5d1b commit a8efedd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .git2gus/config.json
Original file line number Diff line number Diff line change
@@ -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"
}
5 changes: 3 additions & 2 deletions src/help/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit a8efedd

Please sign in to comment.