Deleting a command only deletes one instance of the command

I’ve come across a weird behavior and I am not sure whether this is working as designed or not.

To reproduce the issue you can start with an empty database and issue a certain command (e.g. ls -a, ps, … or whatever comes to mind) several times.
Now invoke the TUI and delete the command. This command is gone, but if you invoke the TUI again, a previous instance of the same command is listed again.

So, my questions are:

  • is this working as designed?
  • if so, wouldn’t it makes sense to also provide a shortcut (e.g. prefix + uppercase D) to delete all instances of that command

It is! Commands may have the same literal command, but very different context. You may wish to delete them from a single context only. As this is the least destructive option, it makes sense as the default

It would make sense

1 Like

I usually delete a command that was run in a wrong directory, so this makes perfect sense to me. To delete all instance, I use atuin search --delete.

Yep, I just didn’t know whether this beahavior was intentional or not. I still think it would be nice to have a way to run atuin search --delete in the TUI via the shortcut I mentioned.