calendar: add todo edit command
Allow editing todo fields (due date, priority) in place via todoman, instead of requiring delete + recreate. Updates all docs for consistency.
This commit is contained in:
@@ -188,7 +188,55 @@ $SKILL_DIR/scripts/calendar.sh todo list --all
|
||||
- [ ] Priority grouping is correct in wrapper output
|
||||
- [ ] `--all` flag works (same output when none are completed)
|
||||
|
||||
## 10. Complete a Todo
|
||||
## 10. Edit a Todo
|
||||
|
||||
Change the due date and priority of the test todo from step 8.
|
||||
|
||||
```bash
|
||||
# Edit due date
|
||||
$SKILL_DIR/scripts/calendar.sh todo edit --match "Test Todo" --due "$(date -d '+5 days' +%Y-%m-%d)"
|
||||
|
||||
# Verify change
|
||||
$SKILL_DIR/scripts/calendar.sh todo list
|
||||
```
|
||||
|
||||
**Verify:**
|
||||
- [ ] Script exits without error
|
||||
- [ ] Output shows "Updated todo: Test Todo" with the change
|
||||
- [ ] `todo list` shows the new due date
|
||||
- [ ] `vdirsyncer sync` ran
|
||||
|
||||
```bash
|
||||
# Edit priority
|
||||
$SKILL_DIR/scripts/calendar.sh todo edit --match "Test Todo" --priority high
|
||||
|
||||
# Verify change
|
||||
$SKILL_DIR/scripts/calendar.sh todo list
|
||||
```
|
||||
|
||||
**Verify:**
|
||||
- [ ] Priority changed to high
|
||||
- [ ] Todo appears under the high priority group in formatted output
|
||||
|
||||
```bash
|
||||
# Edit multiple fields at once
|
||||
$SKILL_DIR/scripts/calendar.sh todo edit --match "Test Todo" --due "$TEST_DATE" --priority low
|
||||
```
|
||||
|
||||
**Verify:**
|
||||
- [ ] Both due date and priority updated in one command
|
||||
|
||||
```bash
|
||||
# Error: no matching todo
|
||||
$SKILL_DIR/scripts/calendar.sh todo edit --match "nonexistent" --due "$TEST_DATE"
|
||||
# Should print error and exit non-zero
|
||||
|
||||
# Error: no fields to edit
|
||||
$SKILL_DIR/scripts/calendar.sh todo edit --match "Test Todo"
|
||||
# Should print "Nothing to change" message
|
||||
```
|
||||
|
||||
## 11. Complete a Todo
|
||||
|
||||
```bash
|
||||
$SKILL_DIR/scripts/calendar.sh todo complete --match "Test Todo"
|
||||
@@ -200,7 +248,7 @@ $SKILL_DIR/scripts/calendar.sh todo complete --match "Test Todo"
|
||||
- [ ] `$SKILL_DIR/scripts/calendar.sh todo list --all` — appears as completed (with checkmark)
|
||||
- [ ] `vdirsyncer sync` ran
|
||||
|
||||
## 11. Delete a Todo
|
||||
## 12. Delete a Todo
|
||||
|
||||
Create a second test todo, then delete it.
|
||||
|
||||
@@ -223,7 +271,7 @@ $SKILL_DIR/scripts/calendar.sh todo delete --match "Delete Me"
|
||||
- [ ] `todo list` (todoman) does not show "Delete Me Todo"
|
||||
- [ ] `vdirsyncer sync` ran
|
||||
|
||||
## 12. Todo Check (Cron Output)
|
||||
## 13. Todo Check (Cron Output)
|
||||
|
||||
```bash
|
||||
# Create a test todo
|
||||
@@ -245,7 +293,7 @@ $SKILL_DIR/scripts/calendar.sh todo check
|
||||
# Should produce no output
|
||||
```
|
||||
|
||||
## 13. Regression: Existing Invite Commands
|
||||
## 14. Regression: Existing Invite Commands
|
||||
|
||||
Verify the rename didn't break VEVENT flow.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user