warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.11k stars 361 forks source link

Have to enter 2 times to execute command on startup #1694

Open howarddo2208 opened 2 years ago

howarddo2208 commented 2 years ago

Discord username (optional)

No response

Describe the bug

On app startup or opening a new tab, every command that I type in isn't syntax highlighted when I first press Enter doesn't execute right away but it minimizes the lines a little, and only when I press enter 1 more time then it run.

The problem would be resolved if I restart the shell with exec zsh, but it is annoying to do this every time opening up Warp

To Reproduce

  1. Open warp
  2. Type in any command
  3. Press enter
  4. Have to press enter again to execute it

Expected behaviour

It should execute right away, and come with syntax highlighting

Screenshots

image after the first enter pressed: image second enter: image

Operating System

MacOS

OS Version

12.5

Shell Version

zsh 5.8.1 (x86_64-apple-darwin21.0)

Warp Version

v0.2022.08.01.09.12.stable_02

Additional context

No response

Does this block you from using Warp daily?

Yes

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

No response

zheng commented 2 years ago

Sorry for this issue! My guess is that there's something in your zsh configs we're not handling well. Does this still happen if you start with no configs? You can do this quickly by putting editing ~/.zshenv to set ZDOTDIR=/

howarddo2208 commented 2 years ago

Sorry for this issue! My guess is that there's something in your zsh configs we're not handling well. Does this still happen if you start with no configs? You can do this quickly by putting editing ~/.zshenv to set ZDOTDIR=/

Yeah, I did put my zsh config files in a separate folder (~/.config/zsh), after using the default path the problem is resolved, but I would like to keep my old config.

zheng commented 2 years ago

Do you know what in the config causes the issue? We’d love to fix the issue in Warp, but need a repro first

On Tue, Aug 9, 2022 at 7:28 PM HowardDo2208 @.***> wrote:

Sorry for this issue! My guess is that there's something in your zsh configs we're not handling well. Does this still happen if you start with no configs? You can do this quickly by putting editing ~/.zshenv to set ZDOTDIR=/

Yeah, I did put my zsh config files in a separate folder (~/.config/zsh), after using the default path the problem is resolved, but I would like to keep my old config.

— Reply to this email directly, view it on GitHub https://github.com/warpdotdev/Warp/issues/1694#issuecomment-1210078085, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHE2A26ZOHUCCTWMY4TWMM3VYMHWBANCNFSM55346LGA . You are receiving this because you commented.Message ID: @.***>

howarddo2208 commented 2 years ago

Here is my zsh config: https://github.com/HowardDo2208/zshconf I set it up from a youtube tutorial: https://youtu.be/bTLYiNvRIVI

warpdotdev-devx commented 1 year ago

Can you help us drill down on what's causing this?

The easiest way to do this is to move your config settings behind this terminal based conditional flag: if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then

WHAT YOU WANT TO DISABLE FOR WARP - BELOW

Whatever you want to disable

WHAT YOU WANT TO DISABLE FOR WARP - ABOVE

fi

After doing so you can move things out of the flag so that they are enabled for Warp until we find what's breaking it.

See our documentation here: https://docs.warp.dev/help/known-issues#debugging

jamapag commented 1 year ago

I had a same issue, fixed by removing this binding:

bindkey '^J' self-insert

vieitesss commented 11 months ago

Hi!

I have the same issue. After searching the lines of the .zshrc with the conditional flag that @warpdotdev-dx provided, I found that these lines are the problem.

source "$(brew --prefix)"/opt/zsh-vi-mode/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
zvm_bindkey viins '^U' end-of-line

I use this plugin to modify the command that I'm writing using vim motions.

e-cal commented 7 months ago

shoutout @jamapag, looks like warp just doesn't handle and ^j (ctrl+j) binds well

in general seems not to play nice with bindkey?

cloud303-cholden commented 1 month ago

I had a same issue, fixed by removing this binding:

bindkey '^J' self-insert

Removing bindkey -r "^J" fixed it for me. Thanks!