Add regex command implementation

This commit is contained in:
Rogee
2025-10-31 10:12:02 +08:00
parent a0d7084c28
commit d436970848
55 changed files with 2115 additions and 9 deletions

View File

@@ -48,6 +48,13 @@ func newUndoCommand() *cobra.Command {
fmt.Fprintf(out, "Inserted text %q removed\n", insertText)
}
}
case "regex":
if pattern, ok := entry.Metadata["pattern"].(string); ok && pattern != "" {
fmt.Fprintf(out, "Reverted regex pattern %q\n", pattern)
}
if template, ok := entry.Metadata["template"].(string); ok && template != "" {
fmt.Fprintf(out, "Template restored to %q\n", template)
}
}
}