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
20.93k stars 359 forks source link

can't clear history #4875

Open ghost opened 4 months ago

ghost commented 4 months ago

Dupe Check

Describe the bug

unable to clear history, removing .zsh_history does not remove history in warp. unsure where warp is caching history (guessing "the cloud" somewhere??) but there needs to ne a way to clear it permanently. do not like my input history being stored on an amazon web server or wherever you've decided to rent it out to for the cheapest bidder.

To reproduce

press up -- see history!! type rm -rf .zsh_history press enter press up -- oops not deleted!!!!!!!!!!!!!!

Expected behavior

expect to have history deleted

Screenshots

No response

Operating system

MacOS

Operating system and version

macos 14

Shell Version

zsh 5.9

Current Warp version

v0.2024.04.30.08.02.stable_01

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

acarl005 commented 4 months ago

Hi. @fsefsrefgwgfageggreg, History will remain in memory for the session. It should be cleared after restarting Warp

ghost commented 4 months ago

That doesn't work. I typed some commands, rm'ed the history, quit and reopened warp, history is still there. A menu option or a "delete history on quit" in the settings would be great.

ghost commented 4 months ago

even using rm .zsh_history and clear and then relaunching warp restores the screen and the history. So something is definitely cached/saved elsewhere and is being restored when relaunching app. Feels like it should be easier to just clear history. That's how it works in every terminal I've used before. You guys can add goofy themes and tabs and AI bullshit but when you type basic commands like rm and clear they still need to work as expected.

pelly-ryu commented 4 months ago

I can't remove the history either.

fyi, my context: macos. after the last update(v0.2024.04.30.08.02.stable_01), its command history isn't updated anymore and shows the same old history (.zsh_history is updated & i can see them in Terminal)

i thought Warp's history was somehow broken, so wanted to clear them, but couldn't find the way


the issue has gone after update(v0.2024.05.07.08.02.stable_02) without any action by me

vorporeal commented 4 months ago

We don't store history in the cloud. Commands you run are never sent to Warp's servers unless you use a feature like block sharing or Warp AI, where that is an explicit part of the feature.

Display of the last few blocks is part of our "session restoration" feature - this can be turned off in Settings > General > "Restore windows, tabs, and panes on startup". The clear command in a shell is typically implemented by pushing everything into scrollback but not actually "clearing" any of it from the terminal buffer. In Warp, "Clear Blocks" (default keybinding cmd+k) is the equivalent of iTerm's "Clear Buffer" (same cmd+k keybinding).

Additionally, Warp stores some command history in its (local-only, never sent to the cloud) sqlite database; on macOS, this can be found at $HOME/Library/Application Support/dev.warp.Warp-Stable/warp.sqlite. Feel free to delete that and see if it addresses the issue. (Your settings are stored elsewhere.)

Warp should read your .zsh_history file at startup and combine it with any history it has saved. If this is not happening (or if you delete the sqlite database and we don't properly import history from your .zsh_history file), please let us know - that's a very bad bug and we'd want to address it immediately.

I agree that we should provide an easy way, within the app, to clear history - I'll file an issue internally to track adding that functionality.

FrenchBen commented 4 months ago

How is Warp splitting the history across .zsh_history and warp.sqlite? There's a high level of inconsistency of history when using split-pane, and the ability to recall history from up/down keyboard keys to CTRL+R

tomer-kay-vastdata commented 3 weeks ago

Deleting warp.sqlite db didn't help, under ctrl R I still see my old commands :(