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.4k stars 375 forks source link

History doesn't contain failed commands #1938

Open yorkshire-geek opened 2 years ago

yorkshire-geek commented 2 years ago

Discord username (optional)

No response

Describe the bug

If I mistype a command and get an error e.g. zsh: command not found: this the (failed) command is not part of the history. Ideally I would like to up arrow and correct my error.

To Reproduce

$ ls ...

$ this is a bad command zsh: command not found: this

$ UP_ARROW_KEY $ ls <<< should be >>> this is a bad command

Expected behaviour

failed commands should be part of history, so I can up arrow and correct my typos. this is how zsh works in terminal

Screenshots

No response

Operating System

MacOS

OS Version

12.6

Shell Version

zsh 5.8.1 (x86_64-apple-darwin21.0)

Warp Version

v0.2022.10.04.08.05.stable_00

Additional context

No response

Does this block you from using Warp daily?

No

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

No response

dannyneira commented 2 years ago

Hi @yorkshire-geek , Sorry to hear about this issue. I've been unable to reproduce this on my end with the latest Warp build. I see incorrect commands in the history UP-ARROW and in the history search CTRL-R. If you can please provide some more context and if possible a video, it will help us debug this issue for you.

Please see my repro attempt/example below:

https://user-images.githubusercontent.com/16809145/194954859-6f84e2a1-b23f-4014-993d-a44004462bdb.mp4

saschwarz commented 2 years ago

I was having this problem and when I upgraded to the following version it started working (wish there was a way to copy paste the version within warp itself easily!):

Screen Shot 2022-10-13 at 8 32 07 PM
kingtran2112 commented 2 years ago

I got the same problem. Sometimes it happen, sometimes not. And not only the error command, it also happen with successful command. image In the picture, I used some git command and when I pressed UP button, it doesn't appear. I also tried some error command and it's not in the history list also.

Here is my version for Warp image And this is my OS information image And my shell version zsh 5.8.1 (x86_64-apple-darwin21.0)

kingtran2112 commented 2 years ago

I tried to record a video for the problem. And for this, look like it gets some of the command to the history

https://user-images.githubusercontent.com/17868670/197133911-1523c57e-6a0b-4611-ae09-eb94b9146718.mov

and when I press COMMAND + R image

lsylvester commented 2 years ago

I am also experiencing this issue.

One thing I have noticed is that after running each command, the prompt appears to have a single space in it, and that when you run a command that starts with a space the command works but is not saved to the history. This also appears to be the case in the above video where mkdir test is slightly indented from touch.txt.

UPDATE: This appears to be being caused by some config in dotfiles. I have disabled configs as per https://docs.warp.dev/help/known-issues#debugging and the issue no longer occurs.

kingtran2112 commented 2 years ago

thanks for the hint @lsylvester. I did the same and realise the theme sorin in prezto may cause the problem. After turn it off, the problem look like have gone

dannyneira commented 1 year ago

@yorkshire-geek Are you still seeing this issue after troubleshooting the dotfiles? https://docs.warp.dev/help/known-issues#debugging