-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(@clack/core,@clack/prompts): multiline support #143
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: b780203 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 |
@cpreston321 @natemoo-re take a look on this version, this would be my approach to implement multi line support on |
Hey @cpreston321 @natemoo-re, I created a subpath If you agree with these alterations, we can create a doc on how to create a theme, I hope you enjoy it! |
@Mist3rBru I am starting to like this. The only thing is core should have the utility function to create the theme and @clack/prompt should create that theme using that helper. Another option is to create another package called I think core should hold core functionality so people can tweak there own. What do you think? @Mist3rBru |
@cpreston321 my goal with
Thinking this way, we will not provide theme options, neither on
That would be the ideal, but since this PR is focused on multiline suport, it should be made on other PR, with more options, to not mix things. For now we can keep it simple, only moving this theme to |
@cpreston321 changes have been applied, changeset is included. When you are ready, it can be merged. Thank you very much for your support! I am glad to contribute 😄. |
Hey @Mist3rBru! I am still seeing some weirdness with multiline on password. Think you can check it out? Once we fine tune this. I will ping nate for feedback. Then hopefully get this merged in 🙏🏼 Screen.Recording.2023-08-24.at.4.55.36.PM.mov |
@cpreston321 I updated the strLength function to handle these unicode, ansi and color chars, now it must not happen again. |
This will be a huge improvement! @cpreston321 @natemoo-re - if you could please review and merge it'd be much appreciated. |
I would hugely value this too 🙋 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be fine, can you check it @natemoo-re please ?
b0bbe9f
to
718b9d5
Compare
f868484
to
f9cae47
Compare
f9cae47
to
b780203
Compare
Seems like this has been functionally complete for over a year. Just wanted to signal a bit more support for this functionality. I love using Clack for one-off, low complexity CLIs to automate processes for teams in repos. Particularly for repo setup scripts for onboarding. One step I'd like to be able to include more easily is pasting an externally stored .env secret file into the script to bootstrap monorepo local secret configurations. Presently there's no way to do that without formatting the stored secret as a single line with delimiters. |
Multiline Support
Support multiline texts either with \n, or long ones that exceed terminal width, without breaking the layout
List of supported prompts:
yes
/no
Continuation of #141
Closes #101
Closes #132
Relates #135 #111 #35