mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-15 10:20:44 +00:00
fix(cli): keep update completion refresh lightweight
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
} from "./completion-fish.js";
|
||||
import {
|
||||
COMPLETION_SHELLS,
|
||||
COMPLETION_SKIP_PLUGIN_COMMANDS_ENV,
|
||||
installCompletion,
|
||||
isCompletionShell,
|
||||
resolveCompletionCachePath,
|
||||
@@ -106,10 +107,12 @@ export function registerCompletionCli(program: Command) {
|
||||
// Eagerly register all subcommands except completion itself to build the full tree.
|
||||
await registerSubcommandsForCompletion(program);
|
||||
|
||||
const { registerPluginCliCommandsFromValidatedConfig } = await import("../plugins/cli.js");
|
||||
await registerPluginCliCommandsFromValidatedConfig(program, undefined, undefined, {
|
||||
mode: "eager",
|
||||
});
|
||||
if (process.env[COMPLETION_SKIP_PLUGIN_COMMANDS_ENV] !== "1") {
|
||||
const { registerPluginCliCommandsFromValidatedConfig } = await import("../plugins/cli.js");
|
||||
await registerPluginCliCommandsFromValidatedConfig(program, undefined, undefined, {
|
||||
mode: "eager",
|
||||
});
|
||||
}
|
||||
|
||||
if (options.writeState) {
|
||||
const writeShells = options.shell ? [shell] : [...COMPLETION_SHELLS];
|
||||
|
||||
Reference in New Issue
Block a user