Warp
Warp copied to clipboard
History deletion management
Describe the solution you'd like?
I'm thinking a history dialog or workflow for managing history
"The one thing I’m missing so far is a way to delete all or part of the history. Sometimes you by mistake type in things you don’t want to sit there in the history list.
Thanks for all the work you put into Warp, and looking forward to the official release."
Is your feature request related to a problem? Please describe.
No response
Additional context
No response
Linking:
- #194
It would be incredibly useful and handy to be able to delete a command from the history via the history popup Of course, this should be agnostic to the shell (bash, zsh or whatever) For instance, in this popup, say I don't want lsof -iTCP:9000 in my history because say 9000 is never going to be something i will check and I entered that by mistake .... It would be great if I can hit delete (or shift-delete or whatever) and have that command removed from history.
I have the same issue/requirement. I can't/don't know how to clear the history.
I cleared it on ZSH with history -c
and even did CTRL+L
but it doesn't delete from the fuzzy search. When I press ⬆️ or do a reverse search (CTRL+R
) it still shows the last commands.
Bumping this, also having the same issue. I now have a sensitive password sticking around in my history (plaintext) from a previous command I was running. The ability to remove suggestions would be appreciated.
CC'ing @zheng she's our expert. @pecasdev can you try these steps:
- Edit your shell’s history file to delete the password
- Press Cmd-K to clear all Blocks from session restoration
- Restart Warp
Can confirm that wiping zsh_history
and restarting Warp did remove the password, thanks!
Hey all, I'm asking for a preference setting to clear history on Command-K.
My use case is simple: I exposed an API key on stream today because I thought my history was cleared with Command-K, and the extra steps needed to clear it out are non-viable in a demanding environment like being on stream.
Related Tweet: https://twitter.com/luke_pighetti/status/1567585061523824642?s=20&t=wocSd2U4LcpY18hF7_fhDw
Hey @lukepighetti - thanks for your feedback. I opened another ticket #1812 to address your concern specifically since this one is focused on another problem
I'd also like to periodically clear my command history. Like all of it. Full sail. This feels like something I should be able to do in settings easily.
This command clears your zsh history
rm -f ~/.zsh_history && kill -9 $$
might be a useful command palette entry?

This feature, a way to quickly delete a command from history, would be greatly appreciated.
I frequently use the Command Search (CTRL
+R
) to type in abbreviations for verbose commands i use often, and let the terminal fill in the rest - like dodo
for docker compose down
. Sometimes I might be a bit too quick on the trigger, and forget to press CTRL
+R
before typing the abbreviation, which results in an invalid command being called and stored in history. From that point on, I can't continue to use the same abbreviation because the abbreviation itself is stored in history and the terminal no longer expands it to be what I want.
Some way of undoing the previous command from history would be golden for this.
Thanks @amundsno I'll bring this up with the team and see if it's something that can be worked on given the demand.
I also wold like an easy way to remove a given entry from the history. Example: Whenever I search the history for "build" I get an old, wrong suggestion and have to manually look for the right one.
This would be especially helpful if you've changed some directory names, so Warp stops suggesting folder names that no longer exist.
I have some intermittent problems with history. For example, connection to one of my machines by ssh is kinda flaky:
- after ssh I often found myself stuck (connection happens, I'm in a remote terminal, but I can't type there, it's frozen; reconnection usually helps)
- what, in my control freak opinion, is much worse, is that I left with the remote machine login message in my Warp history (
The programs included with the Debian GNU/Linux system are free software...
) - this login message IS NOT in my local .zsh_history (and yes,
echo $SHELL
in Warp points to zsh) - restarting Warp do not remove this message from the Warp history
This is irritating. Btw, this is not only example when I don't understand the logic behind the Warp history, especially when few tabs are used, but the only one I could remember right now.
I guess I'm gonna try to delete zsh_history anyway, restart Warp, restore zsh_history, restart Warp again.
I guess I'm gonna try to delete zsh_history anyway, restart Warp, restore zsh_history, restart Warp again.
mv ~/.zsh_history ~/.zsh_history.bak
(done from the Warp itself)
quit Warp
start Warp
And now I have only one tab instead of four... and this tab is completely empty, no scrollback. Fortunately, I will be able to easily restore my tabs and their function, but wtf.
edit: quit Warp, restored zsh_history from Terminal, started Warp - history is there, but still one tab without scrollback. but at least the login message is gone from the history.
Actually, this fake history entity reappeared after 2-3 days. I hate it so much. I'm going to turn off Warp QoL features until I find the feature that does that. Nothing, for me, would be useful enough to justify this nuisance.
I guess I'm gonna try to delete zsh_history anyway, restart Warp, restore zsh_history, restart Warp again.
mv ~/.zsh_history ~/.zsh_history.bak
(done from the Warp itself) quit Warp start WarpAnd now I have only one tab instead of four... and this tab is completely empty, no scrollback. Fortunately, I will be able to easily restore my tabs and their function, but wtf.
edit: quit Warp, restored zsh_history from Terminal, started Warp - history is there, but still one tab without scrollback. but at least the login message is gone from the history.
thanks it works @skaurus
What I found is that commands are stored not only in .zsh_history
but also in Warp's database. Here's a workaround to delete the command history:
sqlite3 "/Users/$USER/Library/Application Support/dev.warp.Warp-Stable/warp.sqlite"
In sqlite shell:
delete from commands;
.exit
.zsh_history
must also be cleared:
echo "" > ~/.zsh_history
This way the command history no longer exists in the history
and in the popup window (up arrow).
command + k?
command K does nothing for me, I tried to clear the command history and no shortcut works
What I found is that commands are stored not only in
.zsh_history
but also in Warp's database. Here's a workaround to delete the command history:sqlite3 "/Users/$USER/Library/Application Support/dev.warp.Warp-Stable/warp.sqlite"
In sqlite shell:
delete from commands; .exit
.zsh_history
must also be cleared:echo "" > ~/.zsh_history
This way the command history no longer exists in the
history
and in the popup window (up arrow).
Thanks, this seemed to work.
It's a bit concerning if we have to edit the database e.g. via sqlite3 to remove history. I accidentally pasted my computer password into Warp for example.
Is there really no simpler way to clear history completely? "Clear Blocks" did not appear to help.
The ability to exclude certain commands from history would also be super helpful. For example, I can't tell you how many autocomplete suggestions I get for git commit -m"
— all of which are useless. If there was a way to define a command ignore list or something I could add git commit
and whatever other commands in my workflow that might occasionally get used with a password. Bonus points if you enable me to periodically wipe the history of certain commands on a recurring basis after some period of time. This would give me all the power of auto complete in the short term without the long term annoyance after say 24hrs or 1 week or something.
Some way of undoing the previous command from history would be golden for this.
This would be great to have. Currently, when I really want to remove a command from history (mistakenly executed), I use the tip from the comment about sqlite3. I basically do this:
- find and delete the command from the .zsh_history file
- use sqlite3 to output all rows from the commands table to a file. Open the file to find the ID of the row that contains the command I want to remove
- use sqlite3 to remove those rows
- quit Warp