Skip to content

prompt.password() bug: triple asterisks on single keypress & paste not working #20

Description

@RainyPixel

Bug Description

There are two issues with prompt.password() (masked password input):

1. Triple asterisks on single keypress

When typing a single character, three asterisks (***) appear instead of one.

2. Paste not working

Cannot paste password from clipboard - nothing appears when using Ctrl+V / Cmd+V.

Environment

  • @bunli/core: ^0.5.4
  • Bun version: 1.3.9
  • OS: Linux/macOS

Reproduction

import { defineCommand } from '@bunli/core';

export default defineCommand({
  name: 'test',
  async handler({ prompt }) {
    const password = await prompt.password('Enter password:');
    console.log('Password length:', password.length);
  },
});

Current Workaround

Using prompt.text() without mask instead.

Expected Behavior

  • One character typed = one asterisk shown
  • Paste from clipboard should work correctly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions