From a344f7a91364d107f5de0f9358678d1224300584 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 26 Sep 2025 12:17:37 +0100 Subject: [PATCH] Edit the new zettel and commit the changes Signed-off-by: Oliver Davies --- cmd/create.go | 4 +--- internal/lib/zet.go | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/create.go b/cmd/create.go index 0df2c13..c11824a 100644 --- a/cmd/create.go +++ b/cmd/create.go @@ -20,13 +20,11 @@ This application is a tool to generate the needed files to quickly create a Cobra application.`, Run: func(cmd *cobra.Command, args []string) { title := "" + if len(args) > 0 { title = strings.Join(args, " ") } lib.CreateZet(title) - - // TODO: Edit the file - // TODO: Commit the changes }, } diff --git a/internal/lib/zet.go b/internal/lib/zet.go index b0e4f92..2fdfeb8 100644 --- a/internal/lib/zet.go +++ b/internal/lib/zet.go @@ -37,6 +37,10 @@ func CreateZet(title string) { if err != nil { log.Fatal(err) } + + EditFile(filePath) + + onSave(zid) } func EditZet(id int) {