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

prompts captures Ctrl-W "cut word" shortcut as control character #394

Open
johnmaguire opened this issue Mar 27, 2023 · 0 comments
Open

Comments

@johnmaguire
Copy link

Describe the bug

When using the readline emacs Ctrl-W shortcut (available in bash and zsh), which is a shortcut for "cut word," removing the previous word from the prompt, the action works but leaves control codes in the input.

To Reproduce

Steps to reproduce the behavior:

  1. node example.js
  2. Ctrl+W, Ctrl+W, Ctrl+W, foo
{
  twitter: '@\x17\x17\x17foo',

Expected behavior

Ideally, cut word works and there are no control codes. Second best option is that Ctrl+W is ignored (#330 appears to do this.)

System

  • OS: macOS
  • Terminal: zsh
  • Node version: v16.13.1

Additional context

These seem as though they should be supported by node readline: https://nodejs.org/api/readline.html#tty-keybindings

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

No branches or pull requests

1 participant