From 3c8fa0f9130bca7fa97ab48d36fcad8c3eb8e13d Mon Sep 17 00:00:00 2001 From: Shakker Date: Sat, 31 Jan 2026 04:54:44 +0000 Subject: [PATCH] fix: remove unused variables and fix template literal type --- src/cli/completion-cli.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/cli/completion-cli.ts b/src/cli/completion-cli.ts index dde644c1ff..42916c1d41 100644 --- a/src/cli/completion-cli.ts +++ b/src/cli/completion-cli.ts @@ -98,7 +98,7 @@ export async function installCompletion(shell: string, yes: boolean, binName = " await fs.appendFile(profilePath, `\n# OpenClaw Completion\n${sourceLine}\n`); console.log(`Completion installed. Restart your shell or run: source ${profilePath}`); } catch (err) { - console.error(`Failed to install completion: ${err}`); + console.error(`Failed to install completion: ${err as string}`); } } @@ -347,14 +347,12 @@ function generateFishCompletion(program: Command): string { } else { // Nested commands // Logic: if seen subcommand matches parents... - const seenCondition = `__fish_seen_subcommand_from ${parents.join(" ")}`; // But fish completion logic is simpler if we just say "if we haven't seen THIS command yet but seen parent" // Actually, a robust fish completion often requires defining a function to check current line. // For simplicity, we'll assume standard fish helper __fish_seen_subcommand_from. // To properly scope to 'openclaw gateway' and not 'openclaw other gateway', we need to check the sequence. // A simplified approach: - const parentChain = parents.join(" "); // Subcommands for (const sub of cmd.commands) {