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?
I have a shell alias
oopswhich 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 runningoopsfeels 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 --deleteto delete the last command from this session, but that's not possible: #1436.atuin search --filter-mode session --search-mode full-text $history[1] --deleteis closer, but it's still not right: thefull-textsearch mode is actually a substring search (so deleting a typo'djwould delete any command containing aj!).prefixis similarly bad, and I don't think it's possible to escape an entire command line for thefuzzyorskimmodes 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
--deleteand--limitwouldn't work together...) If not: could there be?