Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Some key sequences are not passed to the REPL

Open MattiaFregola opened this issue 3 years ago • 9 comments

Describe the bug

Hello! 
While running python, shortcuts related to whole word deletion and jump don't work as expected.

To Reproduce

  1. Open Warp
  2. Ryn python (type in python, then press enter)
  3. Type Hello
  4. Try various shortcuts (see list below)
  • cmd + delete
  • alt + delete
  • alt + left arrow
  • cmd + shift + arrows

PS: I am a complete noob so apologies if this is in fact expected berhaviour!

Expected behaviour

Expected behaviour

- cmd + delete → delete whole line
- alt + delete → delete whole word
- alt + left arrow → jump to beginning of the word
- cmd + shift +  arrows → select whole word

Screenshots

No response

Operating System

MacOS

OS Version

11.6

Additional context

No response

MattiaFregola avatar Oct 09 '21 03:10 MattiaFregola

Hello! This looks like a bug. Is this a blocker for you to use Warp?

zheng avatar Oct 11 '21 16:10 zheng

Hello!

I am not sure how often one might generally be running Python in the Terminal (I am just starting to learn both!), but it looks like it might be just occasionally. So to me it would be just a nice to have but not a blocker.

Thanks for checking!

MattiaFregola avatar Oct 11 '21 21:10 MattiaFregola

It is nearly a blocker for me (I run python often). It would be nice if I could edit commands in python REPL like in Warp prompts (in the real editor), but I understand this may be a very complex feature. But I can't even jump over words with Option+Left/Right! Built-in Terminal can do this, and with "Use Option as Meta key" it can also erase words with Option+Delete. In Warp neither works with and without "Left Option is Meta", and also enabling "Left Option is Meta" breaks word-jumping in prompt editor :(

ark-1 avatar Dec 28 '21 08:12 ark-1

This bug also affects the REPLs for Node.js (16.13.1), Ruby (CRuby 3.0.2-p107), and Deno (v1.16.4). "Left/Right Option key is Meta" has no effect inside the REPL.

counterposition avatar Dec 29 '21 03:12 counterposition

I agree full text editing shortcuts in the REPLs for the different languages would be very helpful! Although I'm not sure how much of a lift this is. Do you suggest any alternatives for now?

albero94 avatar Jun 09 '22 10:06 albero94

@albero94 there are no alternatives for now. But this issue is marked as high internally. Don't see it being fixed soon however

elviskahoro avatar Jul 05 '22 05:07 elviskahoro

Describe the bug

Using option+arrow keys works great to jump words in a normal shell session, but as soon as I start a rails console. instead of jumping one word back, whitespace is entered as input.

To Reproduce

Steps to reproduce:

  1. Install rails
  2. rails new test-project
  3. cd test-project
  4. rails console
  5. input a random sentence
  6. try jumping words with option+arrows

Expected behaviour

No response

Screenshots

No response

Operating System

MacOS

OS Version

11.5

Additional context

No response

elviskahoro avatar Jul 06 '22 13:07 elviskahoro

From @Baccata via #1584

Discord username (optional)

Baccata#0257

Describe the bug

When using a REPL application inside warp (such as the python REPL), command+arrow keys do not allow to jump to the next whitespace

I do not know the exact name of the feature, but when in a terminal, using command+left/right arrow keys usually let me jump the cursor to the next whitespace. This feature usually works in REPL applications loaded inside the terminal.

To Reproduce

  1. Inside warp, open a REPL application (python, for instance)
  2. write a few words separated by spaces (doesn't have to be valid syntax)
  3. attempt to use command+left-arrow
  4. nothing happens

Expected behaviour

My expectation is that the cursor should jump to the previous whitespace

Screenshots

Using the integrated vscode terminal (correct behaviour): https://user-images.githubusercontent.com/4439335/177481151-a2ecc289-92ec-4963-a602-7300183d8601.mov

Using warp (incorrect behaviour): https://user-images.githubusercontent.com/4439335/177481257-7bc6a1a6-ed96-43a6-b106-2eaca9e64417.mov

Operating System

MacOS

OS Version

12.3.1

Shell Version

zsh 5.8

Warp Version

v0.2022.06.27.09.14.stable_01

Additional context

No response

Does this block you from using Warp daily?

No

Warp Internal (ignore): linear-label:24888f54-df93-45d5-9bdd-e38f740cac19

No response

elviskahoro avatar Jul 19 '22 18:07 elviskahoro

This is just about a deal breaker for me. I use this constantly in the rails console...Every other terminal this works fine.

joelcahalan avatar Sep 19 '22 01:09 joelcahalan

Adding extra emphasis that this is a deal-breaker. It's frustrating to use, and embarrassing to be fumbling in the Rails console while pairing with co-workers.

doompling avatar Oct 14 '22 17:10 doompling

This is a huge deal for me, as it doesn't just effect python and whatnot, it seems to effect just about any subshell like system - mysql, psql, gitsh, etc. This is just about the only thing in Warp that is a near deal breaker.

ericmerrill avatar Jan 15 '23 23:01 ericmerrill

I can +1 this. I've moved to iTerm because of this bug. Just FYI. :)

pedrospdc avatar Jan 16 '23 08:01 pedrospdc

+1 I can do Esc-f, Esc-b but not ideal

korakotlee avatar Jan 29 '23 19:01 korakotlee

I abandoned Warp long ago because this issue.

You can replicate the majority of Warp's novel functionality by pre-pending your shell commands with a horizontal line break. I added this followed by a line break to my shell, works pretty well. At some point I'll update it so it dynamically resizes with the terminal:

───────────────────────────────────────────────────────────────────────────────────────────────────────

doompling avatar Feb 02 '23 22:02 doompling

I received another report on https://www.producthunt.com/posts/warp-ai that Meta-F and Meta-B are moving cursor forward/back in irb. I was able to reproduce this on Warp.

  1. irb
  2. Type a few words
  3. Meta-b should move cursor backward by a word. But it does not.

michlimlim avatar Mar 19 '23 17:03 michlimlim

This affects subshells in general. For example:

  1. open a new window or tab in Warp
  2. type zsh and hit Return
  3. type echo hello
  4. hit ⌥B

Warp adds an integral symbol after 'hello' instead of placing the cursor before the word.

I noticed this when entering a Nix shell with nix shell nixpkgs#ruby_3_1. Fixing the bug for subshells will probably fix it for Nix shells and REPLs as well.

counterposition avatar Mar 19 '23 18:03 counterposition

hey @MattiaFregola & Folks! This has been fixed/released as of Warp version v0.2023.03.28.08.03.stable_01!

Closing as completed 🚀

dannyneira avatar Mar 30 '23 21:03 dannyneira

Woohooo! So awesome that this made it, thanks @dannyneira !!

MattiaFregola avatar Mar 30 '23 21:03 MattiaFregola

Nice! One of our brilliant engineers @acarl005 was the one who knocked this out! 🥇

dannyneira avatar Mar 30 '23 21:03 dannyneira