-
-
Notifications
You must be signed in to change notification settings - Fork 777
Description
I have a shell alias oops which removes the last command from history (implementation: history delete --exact --case-sensitive -- $history[1]). I'd like to add Atuin support to it (since having to press ctrl-r, ctrl-o, ctrl-d, esc as well as running oops feels a bit much), but I can't find any way to ask Atuin to forget about the last command I ran.
I was hoping to be able to atuin search --filter-mode session --limit 1 --delete to delete the last command from this session, but that's not possible: #1436. atuin search --filter-mode session --search-mode full-text $history[1] --delete is closer, but it's still not right: the full-text search mode is actually a substring search (so deleting a typo'd j would delete any command containing a j!). prefix is similarly bad, and I don't think it's possible to escape an entire command line for the fuzzy or skim modes in a way that will only match that exact string.
Is there any way to achieve this currently? (Looking at the code, I don't actually really understand why --delete and --limit wouldn't work together...) If not: could there be?