dbcli / litecli

CLI for SQLite Databases with auto-completion and syntax highlighting
https://litecli.com
BSD 3-Clause "New" or "Revised" License
2.52k stars 74 forks source link

Ctrl+y in vi mode not working #93

Open FreddieOliveira opened 4 years ago

FreddieOliveira commented 4 years ago

Description

When configured to use vi mode, Ctrl+y doesn't yank the previous cut text.

Steps to reproduce

  1. Add key_bindings = vi to your config file
  2. Open litecli and type pragma table_info('albums')
  3. Hit Ctrl+w
  4. Hit Ctrl+y

Expected behavior

Ctrl+w should cut table_info('albums') text and Ctrl+y should paste it back

Actual behavior

Ctrl+w cut the text as intended, but Ctrl+y doesn't do anything.

amjith commented 4 years ago

@FreddieOliveira Don't mean to pass the buck here, but we use prompt-toolkit to build the CLI which provides the vi-mode option. Would you mind filing the bug with prompt-toolkit?

FreddieOliveira commented 4 years ago

Ooh, ok. But I guess it would be nice to have a user friendly way of adding custom keyboard shortcuts. Even if prompt-toolkit changes the shortcuts, it still won't be possible to add custom ones.