jrnl icon indicating copy to clipboard operation
jrnl copied to clipboard

Add yes/no/interactive option for all affected entries when deleting

Open micahellison opened this issue 4 years ago • 5 comments

Feature Request

@guydebros had an interesting idea in response to #973 that could complement the solution or be implemented on its own:

jrnl -10 --delete returns a list (short-form) of the entries to be deleted, or a message like "This will delete 132 entries from 1/31/2009 to 2/3/2012, are you sure you want to proceed?" And the choices would be "y/N/i" where i = interactive.

Pressing "i" would take the user to the current interactive delete feature.

Use Case/Motivation

It's a bit tedious to delete a lot of entries right now. Being able to delete all of them at once (or say no to all of them at once!) could be nice.

micahellison avatar Jun 06 '20 20:06 micahellison

I like it.

It might be overkill, but a second confirmation might be reassuring to people. "This will delete 12 entries, are you sure?" Yes, I'm sure. "OK, but are you REALLY sure? Enter yes, I promise I'm certain to confirm." Hmm, now that you mention it, let me take a look at them. i!

guydebros avatar Jun 07 '20 17:06 guydebros

is this good to work on right now? I don't want to mess with the delete-force stuff, but this seems fine because it doesn't change any argument parsing functionality.

eshrh avatar Jun 11 '20 13:06 eshrh

Yes, feel free to work on this! As long as there are solid tests for this (especially in conjunction with the filtering features like -before and -n), I think just about any solution along these lines should be fine.

micahellison avatar Jun 13 '20 17:06 micahellison

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 12 '20 21:08 stale[bot]

@eshrh All of the cli refactoring is merged in now. So, you should be good to work on this (or any other related issue) now. Thanks for your patience!

wren avatar Aug 22 '20 19:08 wren