AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.08k stars 351 forks source link

DECCKM on - Unexpected Escape Sequence: ['\x1b' 'O'] #340

Closed gaborbernat closed 3 years ago

gaborbernat commented 3 years ago

What operating system and terminal are you using?

macOS Powershell with wezterm.

An example that showcases the bug.

https://github.com/cli/cli/issues/3071

What did you expect to see?

\x1bO is the encoding used to represent cursor keys when DECCKM is enabled. The default is disabled and cursor up is represented as the ANSI CSI A. When DECCKM is enabled SS3 A is used instead. We figured out that powershell is setting DECCKM for its line editing, but not clearing it when launching programs

What did you see instead?

 gh auth login
? What account do you want to log into?  [Use arrows to move, type to filter]
> GitHub.com
  GitHub Enterprise Server
could not prompt: Unexpected Escape Sequence: ['\x1b' 'O']
gaborbernat commented 3 years ago

Duplicate of #341.