copier icon indicating copy to clipboard operation
copier copied to clipboard

feat: submit multiline with Opt+Enter on Mac

Open tpluscode opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Multiline questions say (Finish with 'Alt+Enter' or 'Esc then Enter')

Apparently only the latter works on Macs because they do not have the Alt key

Describe the solution you'd like

I would not even change the help text, but simply make Option+Enter work since that key typically functions as Alt

tpluscode avatar Feb 26 '22 11:02 tpluscode

I can't fix it unless someone gives me a Mac. 😁

yajo avatar Feb 26 '22 14:02 yajo

AFAICT this is controlled by the underlying prompt-toolkit library.

Their README says,

To execute the input in multi-line mode, you can either press Alt+Enter, or Esc followed by Enter. (If you want the first to work in the OS X terminal, you have to check the "Use option as meta key" checkbox in your terminal settings. For iTerm2, you have to check "Left option acts as +Esc" in the options.)

sid-maddy avatar Oct 04 '22 20:10 sid-maddy

That should be a fix, right?

yajo avatar Oct 06 '22 12:10 yajo