Add info and edit commands for interactive task management

- Add 'opal info' command to display detailed task information
  - Shows all task attributes including UUID, timestamps, and metadata
  - Supports flexible syntax (opal info 2 or opal 2 info)
  - Displays recurrence information and parent UUID for recurring tasks

- Add 'opal edit' command to edit tasks in $EDITOR
  - Opens task in text editor with human-readable format
  - Supports all editable fields with smart date formatting
  - Special handling for recurring tasks (updates parent template)
  - Status changes trigger appropriate methods (Complete/Delete)
  - Auto-saves changes on editor exit without confirmation
  - Clear validation and error messages

- Register new commands in root command dispatcher
This commit is contained in:
2026-01-05 11:05:07 +01:00
parent d0b46beeec
commit 79eb3bb62a
4 changed files with 621 additions and 2 deletions
+3
View File
@@ -25,6 +25,7 @@ const parsedArgsKey contextKey = "parsedArgs"
var commandNames = []string{
"add", "list", "done", "modify", "delete",
"start", "stop", "count", "projects", "tags",
"info", "edit",
}
var commandsWithModifiers = map[string]bool{
@@ -169,6 +170,8 @@ func init() {
rootCmd.AddCommand(countCmd)
rootCmd.AddCommand(projectsCmd)
rootCmd.AddCommand(tagsCmd)
rootCmd.AddCommand(infoCmd)
rootCmd.AddCommand(editCmd)
}
func initializeApp() {