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.38k stars 373 forks source link

Delete command history suggestion #3675

Open luis-pato opened 1 year ago

luis-pato commented 1 year ago

My Problem

A few weeks ago, I made a typo when entering a command. Now, I continually receive this incorrect command as an autocomplete suggestion, which has caused me to accidentally run it multiple times.

I believe it would be beneficial to have a feature that allows us to remove autocomplete suggestions from our command history.

Discord username (optional)

No response

Describe the solution you'd like?

 Perhaps, when the autocomplete suggestion list appears as we start typing, we could include a "Remove suggestion" button when hovering over one of the suggestions.

Is your feature request related to a problem? Please describe.

No response

Additional context

No response

How important is this feature to you?

2

Warp Internal (ignore) - linear-label:770f6576-d6c0-4e4f-a259-fc64b5156087

None

warpdotdev-devx[bot] commented 1 year ago

Thanks for this request, very good idea to edit the autosuggestions.

To anyone else interested in this feature, please add a ๐Ÿ‘ to the original post at the top to signal that you want this feature, and subscribe if you'd like to be notified.

dannyneira commented 1 year ago

@luis-pato As of last week's Warp release v0.2023.09.12.16.17 or newer, Autosuggestions now prioritize commands from history that were executed in the current directory so that should help. If you're still seeing the issue. As a possible workaround, you can delete the entry from history to prevent it from showing up in autosuggestions in new sessions (e.g. history -d {{line_number}}).

luis-pato commented 1 year ago

thanks @dannyneira that sounds like an interesting tip.

Unfortunately it didn't work. I have done history and then searched for the line i wanted to delete. Then i have done for instance history -d 11594. I get back a new history list. When i search it i still see the line 11594 and when i try out the command i also still see the incorrect suggestion (but you are right, the "correct suggestion" is suggested first). I need to look around to see why it isn't working...

But i still think being able to edit / delete directly from the suggestion list would be a nice feature ๐Ÿ˜‰

Knogobert commented 12 months ago

Firefox (& other browsers) have this removal functionality in the omni-bar, by entering ctrl+shift+backspace while a certain row is focused. It felt natural to me to try it in warp as well. Perhaps at least add this as a shortcut and you donโ€™t have to worry about the UI that much for starters. To try and see if this suffices for us plebs <3

pete-willard commented 5 months ago

The ability to shortcut-delete a highlighted suggestion would be a most welcome one. Bump!