MCPcopy Index your code
hub / github.com/codeaashu/claude-code / regenerateCompletionCache

Function regenerateCompletionCache

src/utils/completionCache.ts:140–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138 * Called after `claude update` so completions stay in sync with the new binary.
139 */
140export async function regenerateCompletionCache(): Promise<void> {
141 const shell = detectShell()
142 if (!shell) {
143 return
144 }
145
146 logForDebugging(`update: Regenerating ${shell.name} completion cache`)
147
148 const claudeBin = process.argv[1] || 'claude'
149 const result = await execFileNoThrow(claudeBin, [
150 'completion',
151 shell.shellFlag,
152 '--output',
153 shell.cacheFile,
154 ])
155
156 if (result.code !== 0) {
157 logForDebugging(
158 `update: Failed to regenerate ${shell.name} completion cache`,
159 )
160 return
161 }
162
163 logForDebugging(
164 `update: Regenerated ${shell.name} completion cache at ${shell.cacheFile}`,
165 )
166}
167

Callers 1

updateFunction · 0.85

Calls 3

detectShellFunction · 0.85
logForDebuggingFunction · 0.85
execFileNoThrowFunction · 0.85

Tested by

no test coverage detected