keith / reminders-cli

A simple CLI for interacting with macOS reminders
MIT License
663 stars 52 forks source link

Add uncomplete command #64

Closed caltuntas closed 1 year ago

caltuntas commented 1 year ago

By default, the show command shows only incomplete items, so the user has to execute the reminders show Todo --only-completed command to retrieve completed items and their numbers. Then, the reminders uncomplete Todo 9 command can be called to switch it back to the incomplete state.

Please bear in mind that I have 0 knowledge of Swift. I tried to make some changes and came up with this solution. I have tested it locally, and everything seems to be working.

Since the uncomplete operation uses the same flag field as the complete operation (isCompleted), instead of duplicating the complete function in Reminders.swift, I used the same function by just making it a parameter. Please review and let me know if there is anything that needs to be changed.