Skip to content

Feat/auto install prompt completion#27

Merged
Jamkris merged 2 commits into
mainfrom
feat/auto-install-prompt-completion
Apr 13, 2026
Merged

Feat/auto install prompt completion#27
Jamkris merged 2 commits into
mainfrom
feat/auto-install-prompt-completion

Conversation

@Jamkris

@Jamkris Jamkris commented Apr 13, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added config set-completion on/off command to enable or disable shell completion
    • Added automatic installation of prompt indicators for bash and zsh shells
    • Added uninstallation capability for shell integrations
    • Enhanced internationalization support with Korean language translations
  • Chores

    • Version bumped to 1.2.13

Jamkris added 2 commits April 13, 2026 16:07
- `config set-prompt on` now auto-injects shell integration into the
  detected rc file (bash, zsh, fish) so users no longer need to edit
  .bashrc/.zshrc/config.fish manually. Uses a `# ghem prompt indicator`
  marker to stay idempotent; `off` continues to toggle the runtime flag.
- Add `config set-completion <on|off>` mirroring set-prompt, reusing
  installCompletion() and a new uninstallCompletion() that strips the
  marker block from the rc file.
- Extend i18n (en, ko) with install/uninstall messages and register the
  new subcommand in bash/zsh completion scripts.
@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

Version bumped to 1.2.13 with new shell integration features: uninstallCompletion() function for removing shell completions, installPromptIndicator() for installing prompt integrations, and a new config set-completion <on|off> subcommand. Updates completion script generation and config command to invoke these installers with status-based logging. Extends i18n messages in English and Korean locales.

Changes

Cohort / File(s) Summary
Version updates
package.json, src/index.ts
Version bumped from 1.2.12 to 1.2.13.
Shell completion uninstall
src/commands/completion.ts
Added UninstallResult type and uninstallCompletion() function; imports writeFileSync; detects shell, finds rc file, removes completion marker and following line. Updated bash/zsh completion script generation to advertise set-completion subcommand.
Prompt indicator installation
src/commands/prompt.ts
Added PromptInstallResult type and installPromptIndicator() function; detects shell, checks rc file for existing marker, appends integration lines with directory creation as needed.
Config command integration
src/commands/config.ts
Added config set-completion <on|off> subcommand with install/uninstall logic and status-based exit handling; integrated installPromptIndicator() into config set-prompt <on> flow with logging.
Internationalization
src/i18n/types.ts, src/i18n/locales/en.ts, src/i18n/locales/ko.ts
Extended Messages interface with new keys: promptInstalled, promptAlreadyInstalled, promptFailed, promptUnsupported, completionInvalid, completionUninstalled, completionNotInstalled. Added corresponding strings in English and Korean locales.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested labels

security

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main feature: automatic installation of prompt indicator and shell completion integrations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/auto-install-prompt-completion

Comment @coderabbitai help to get the list of available commands and usage tips.

@Jamkris Jamkris merged commit ed1eab7 into main Apr 13, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant