// Profile uses slow dynamic pattern - upgrade to cached version if (status.usesSlowPattern) {
note(
`Your ${status.shell} profile uses slow dynamic completion (source <(...)).\nUpgrading to cached completion for faster shell startup...`, "Shell completion",
);
// Ensure cache exists first if (!status.cacheExists) { const generated = await generateCompletionCache(); if (!generated) {
note(
`Failed to generate completion cache. Run \`${cliName} completion --write-state\` manually.`, "Shell completion",
); return;
}
}
// Upgrade profile to use cached file
await installCompletion(status.shell, true, cliName);
note(
`Shell completion upgraded. Restart your shell or run: source ~/.${status.shell === "zsh" ? "zshrc" : status.shell === "bash" ? "bashrc" : "config/fish/config.fish"}`, "Shell completion",
); return;
}
// Profile has completion but no cache - auto-fix if (status.profileInstalled && !status.cacheExists) {
note(
`Shell completion is configured in your ${status.shell} profile but the cache is missing.\nRegenerating cache...`, "Shell completion",
); const generated = await generateCompletionCache(); if (generated) {
note(`Completion cache regenerated at ${status.cachePath}`, "Shell completion");
} else {
note(
`Failed to regenerate completion cache. Run \`${cliName} completion --write-state\` manually.`, "Shell completion",
);
} return;
}
// No completion at all - prompt to install if (!status.profileInstalled) { if (options.nonInteractive) { // In non-interactive mode, just note that completion is not installed return;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.