git-bug icon indicating copy to clipboard operation
git-bug copied to clipboard

CLI text input doesn't have a proper cursor

Open fmenabe opened this issue 4 years ago • 1 comments

When adding a bridge interactively (using git bug bridge configure), using keyboard arrows add odd characters (^[[D for left arrow) instead of moving in the string.

For exemple using left arrow in base url:

Gitlab base url:
[0]: https://gitlab.com
[1]: enter your own base url
Select option: 1           
Base url: https://git.unsi^[[D

The terminal used is Yakuake (based on KDE Konsole).

fmenabe avatar Feb 25 '20 20:02 fmenabe

Doing that seems to require some complex shenanigan like switching the terminal into raw mode (see https://stackoverflow.com/questions/30689640/cursor-key-terminal-input-in-go). It might even need OS specific code and tricky code to support unicode properly.

MichaelMure avatar Feb 29 '20 16:02 MichaelMure