History doesn't contain failed commands

Open
#1,938 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust, zsh
Domain
cli

Research direction

Start by reproducing the failed-command case in Warp with zsh and trace how commands are added to history. Done means a command that exits with an error remains available through the up-arrow history, matching the reported zsh behavior.

Written by the indexing model from the issue text.

Description

area:search bug ready-to-implement triaged
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

Dominant language
Rust
Stars
65.1k
Forks
5.6k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from warpdotdev/warp

All issues in warpdotdev/warp

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.