Skip to content

Commit

Permalink
Merge pull request #1791 from salesforcecli/mdonnalley/use-colorize
Browse files Browse the repository at this point in the history
fix: use ux.colorize
  • Loading branch information
WillieRuemmele authored Jul 10, 2024
2 parents 6e9d7f7 + 1b2a4d1 commit aa4a479
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/help/sfHelp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { CommandHelp, Help } from '@oclif/core/help';
import Interfaces from '@oclif/core/interfaces';
import { toConfiguredId } from '@oclif/core/util/ids';
import { Ansis } from 'ansis';
import { colorize } from '@oclif/core/ux';
import { SfCommandHelp } from './sfCommandHelp.js';

const ansis = new Ansis();
Expand Down Expand Up @@ -69,7 +70,7 @@ export default class SfHelp extends Help {
let formattedArg = arg.slice();
const matches = ansis.strip(formattedArg).match(this.commandIdRegex) ?? [];
for (const match of matches) {
formattedArg = formattedArg.replaceAll(match, ansis.dim(match));
formattedArg = formattedArg.replaceAll(match, colorize('dim', match));
}

return formattedArg;
Expand Down

0 comments on commit aa4a479

Please sign in to comment.