diff --git a/src/hooks/incomplete.ts b/src/hooks/incomplete.ts index 36691d0a..cdeb4e66 100644 --- a/src/hooks/incomplete.ts +++ b/src/hooks/incomplete.ts @@ -8,7 +8,6 @@ import * as os from 'os'; import { Hook, toConfiguredId, toStandardizedId, Interfaces, Command, loadHelpClass } from '@oclif/core'; import { Prompter } from '@salesforce/sf-plugins-core'; -import { Lifecycle } from '@salesforce/core'; function buildChoices( matches: Command.Loadable[], @@ -27,7 +26,6 @@ function buildChoices( } async function determineCommand(config: Interfaces.Config, matches: Command.Loadable[]): Promise { - if (matches.length === 1) return matches[0].id; const prompter = new Prompter(); const choices = buildChoices(matches, config); const { command } = await prompter.timedPrompt<{ command: Command.Loadable }>([ @@ -52,15 +50,6 @@ const hook: Hook.CommandIncomplete = async function ({ config, matches, argv }) return help.showHelp([toStandardizedId(command, config), ...argv]); } - if (matches.length === 1) { - await Lifecycle.getInstance().emitWarning( - `One command matches the partial command entered, running command:${os.EOL}${config.bin} ${toConfiguredId( - command, - config - )} ${argv.join(' ')}` - ); - } - return config.runCommand(toStandardizedId(command, config), argv); };