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

input prompt with files: true ignores default value #780

Open
mwmcode opened this issue Jan 3, 2025 · 0 comments · May be fixed by #783
Open

input prompt with files: true ignores default value #780

mwmcode opened this issue Jan 3, 2025 · 0 comments · May be fixed by #783

Comments

@mwmcode
Copy link

mwmcode commented Jan 3, 2025

Current behavior

Input prompt returns . when user hits Enter even though a default value is provided.

Expected behavior

It should return the default value

Steps to reproduce

import { Input } from '@cliffy/prompt/input';

const result: string = await Input.prompt({
  message: 'which directory?',
  files: true,
  default: '/some/path',
});

console.log({ result }); // `.`

repo to reproduce the issue


Thanks for the awesome package, btw.

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 a pull request may close this issue.

1 participant