feat(@clack/core,@clack/prompts): Multiline text input#240
Merged
dreyfus92 merged 16 commits intobombshell-dev:mainfrom Apr 1, 2026
Merged
feat(@clack/core,@clack/prompts): Multiline text input#240dreyfus92 merged 16 commits intobombshell-dev:mainfrom
dreyfus92 merged 16 commits intobombshell-dev:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 61486ae The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
natemoo-re
approved these changes
Mar 18, 2025
Member
natemoo-re
left a comment
There was a problem hiding this comment.
Wow great stuff, thank you for contributing!
vivekrpatel8
approved these changes
Mar 4, 2026
|
I'd love if this is merged. Its annoying to do multi-line with such a beautiful library. Only thing missing imo. |
This way they pass in every timezone.
Now double-enter submits unless you set `showSubmit`, then we show a submit button
Member
|
thank you @43081j 🎉 |
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.
Add a new prompt:
MultiLinePromptand its renderingmultilineChanges
Added to
@clack/corereturnto keep retro-compatibility)isSameKey) to test if two key are the same (withctrl,meta,shiftincluded in the check)MultiLinePromptAdded to
@clack/promptsmultilineDifficulties and workaround
Issue: The
returnkey is used to submit the prompt and is hardcoded, so impossible to insert new lineSolution: Make the submit key configurable (see:
packages/core/src/prompts/prompt.ts:{22,53,210})Issue: The default cursor management use vim mapping, so when pressing letter
k,j,horlto add those letter, the cursor also moves.Solution: Re-implementing of the cursor management without vim mapping (see
packages/core/src/prompts/multi-line.ts:29)Issue: The event
keylower the inputted char, so uppercased char are never displayedSolution: Create a new event
rawKeyto send the untouched value (also used for the cursor management)