diff --git a/src/commands/completions.ts b/src/commands/completions.ts index 54a144f..ad35d72 100644 --- a/src/commands/completions.ts +++ b/src/commands/completions.ts @@ -1,4 +1,5 @@ import type { Command, Option } from "commander" +import { DEFAULTS } from "../config.ts" /** Generate fish completion lines from the Commander program tree. */ export function generateFishCompletions(program: Command): string[] { @@ -51,6 +52,13 @@ export function generateFishCompletions(program: Command): string[] { lines.push(`complete -c sandlot -n "__fish_seen_subcommand_from ${branchCommands.join(" ")}" -xa "(__sandlot_sessions)"`) } + // Config key completions + const configKeys = Object.keys(DEFAULTS) + if (configKeys.length > 0) { + lines.push("") + lines.push(`complete -c sandlot -n "__fish_seen_subcommand_from config" -xa "${configKeys.join(" ")}"`) + } + lines.push("") return lines }