Skip to content
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

[Request] Allow tab-to-complete for placeholders #114

Closed
JoshuaKGoldberg opened this issue Mar 30, 2023 · 3 comments · Fixed by #146
Closed

[Request] Allow tab-to-complete for placeholders #114

JoshuaKGoldberg opened this issue Mar 30, 2023 · 3 comments · Fixed by #146
Labels
enhancement New feature or request

Comments

@JoshuaKGoldberg
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

When getting a value from a prompt that includes a placeholder, it'd be nice if the user doesn't have to typoe it out explicitly. Other prompts allow pressing Tab to fill in the placeholder. Can we add this to Clack please?

import { text } from "@clack/prompts";

const value = await text({
	message: "input text please",
	placeholder: "default value do I have to type this out"
});

Describe the solution you'd like

When an input prompt is active and the placeholder exists and .startsWith the current typed text value (intentionally true for ""), pressing Tab should set the current typed text value to the placeholder.

Describe alternatives you've considered

🤷

Additional context

I'd love to send a PR! ❤️

@JoshuaKGoldberg JoshuaKGoldberg added the enhancement New feature or request label Mar 30, 2023
@JoshuaKGoldberg
Copy link
Collaborator Author

ping @natemoo-re / @cpreston321 - is this something you have any interest in? I'd be happy to add it in myself, and even help maintain the library!

@cpreston321
Copy link
Collaborator

cpreston321 commented Aug 21, 2023

@JoshuaKGoldberg I think we would appreciate to have another maintainer! Nate is the only one that has add access. If you would like please open a PR so @natemoo-re has visibility!

I think the goal is to get everything off the list for #35. Then starting adding new features after release.

Thanks,
CP

@JoshuaKGoldberg
Copy link
Collaborator Author

Swell, thanks! I'll try to get to this Soon™️.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants