Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Have to enter 2 times to execute command on startup

Open howarddo2208 opened this issue 3 years ago • 10 comments

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

howarddo2208 avatar Aug 08 '22 06:08 howarddo2208

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=/

zheng avatar Aug 08 '22 20:08 zheng

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.

howarddo2208 avatar Aug 10 '22 02:08 howarddo2208

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: @.***>

zheng avatar Aug 10 '22 03:08 zheng

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

howarddo2208 avatar Aug 10 '22 06:08 howarddo2208

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

warpdotdev-devx avatar Oct 11 '22 07:10 warpdotdev-devx

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

bindkey '^J' self-insert

jamapag avatar Mar 17 '23 15:03 jamapag

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.

vieitesss avatar Oct 19 '23 08:10 vieitesss

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

in general seems not to play nice with bindkey?

e-cal avatar Feb 22 '24 16:02 e-cal