fix(ui): prompt to quit on ctrl+d - #2520
Open
officialasishkumar wants to merge 1 commit into
Open
Conversation
officialasishkumar
requested review from
andreynering and
raphamorim
and removed request for
a team
March 28, 2026 14:42
Contributor
|
Thank you for your submission. We really appreciate it! Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request comment same as the below format. I have read the Contributor License Agreement (CLA) and hereby sign the CLA. You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Bojun-Vvibe
added a commit
to Bojun-Vvibe/oss-contributions
that referenced
this pull request
May 5, 2026
- google-gemini/gemini-cli#26225 MessageBus fail-fast — merge-after-nits - QwenLM/qwen-code#3627 macOS desktop installer — merge-after-nits - aaif-goose/goose#9014 unread state for background chats — merge-after-nits - charmbracelet/crush#2520 Ctrl+D quit prompt — merge-as-is
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Treat
ctrl+dlike EOF in the editor when the prompt is empty by opening the existing quit confirmation dialog.Problem
ctrl+dis a common REPL EOF shortcut, but Crush currently ignores it in the editor unless the user typesquitor usesctrl+c.Before
ctrl+d.After
ctrl+dwith an empty editor opens the existing quit dialog.ctrl+ddetails behavior is unchanged outside the empty-editor EOF case.ctrl+ddoes not prompt to quit when there is typed input or pending attachments.Changes
ctrl+dwhile the editor is focused.Test Plan
go test ./internal/ui/modelCloses #2428