Skip to content

fix(prompts): submit initial directory value in path prompt#484

Merged
43081j merged 4 commits intomainfrom
fix/path-dir-def
Mar 10, 2026
Merged

fix(prompts): submit initial directory value in path prompt#484
43081j merged 4 commits intomainfrom
fix/path-dir-def

Conversation

@dreyfus92
Copy link
Member

this pr fixes path directory mode so when an existing directory is provided as initialValue, pressing enter immediately submits that current directory instead of the first child option.

closes: #477

@changeset-bot
Copy link

changeset-bot bot commented Mar 9, 2026

🦋 Changeset detected

Latest commit: 51e6491

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clack/prompts Patch

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

@43081j
Copy link
Collaborator

43081j commented Mar 10, 2026

@dreyfus92 what do you think of these changes i added?

basically /foo will show /foo (if it is a dir), but /foo/ will show child directories of /foo.

without this change, there's no longer a way to traverse into /foo other than knowing the name of a child by memory

@dreyfus92
Copy link
Member Author

this is clever @43081j, and nothing breaks so ig it works! 😄

@43081j 43081j merged commit 29a50cb into main Mar 10, 2026
5 checks passed
@43081j 43081j deleted the fix/path-dir-def branch March 10, 2026 18:35
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.

[Bug] path directory cant direct select default value

2 participants