From c9b87dd121c08adb5c7cf1a3cd2816d11b12a48e Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Wed, 17 Jul 2024 15:53:17 -0400 Subject: [PATCH] Move text editor config under [MUTN] section header in libmutton.ini --- src/cli/edit.go | 2 +- src/cli/init.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/edit.go b/src/cli/edit.go index 9fa3730..7e94ef8 100644 --- a/src/cli/edit.go +++ b/src/cli/edit.go @@ -75,7 +75,7 @@ func editNote(baseNote []string) ([]string, bool) { }(tempFile.Name()) // fetch the user's text editor - editor := backend.ParseConfig([][2]string{{"LIBMUTTON", "textEditor"}}, "")[0] + editor := backend.ParseConfig([][2]string{{"MUTN", "textEditor"}}, "")[0] // write baseNote to tempFile (if it is not empty) if len(baseNote) > 0 { diff --git a/src/cli/init.go b/src/cli/init.go index 36f01ae..df02958 100644 --- a/src/cli/init.go +++ b/src/cli/init.go @@ -47,7 +47,7 @@ func TempInitCli() { backend.DirInit(false) // write config file (temporarily assigns sshEntryRoot and sshIsWindows to null to pass initial device ID registration) - backend.WriteConfig([][3]string{{"LIBMUTTON", "textEditor", textEditor}, {"LIBMUTTON", "gpgID", gpgID}, {"LIBMUTTON", "sshUser", sshUser}, {"LIBMUTTON", "sshIP", sshIP}, {"LIBMUTTON", "sshPort", sshPort}, {"LIBMUTTON", "sshKey", sshKey}, {"LIBMUTTON", "sshKeyProtected", strconv.FormatBool(sshKeyProtected)}, {"LIBMUTTON", "sshEntryRoot", "null"}, {"LIBMUTTON", "sshIsWindows", "null"}}, false) + backend.WriteConfig([][3]string{{"MUTN", "textEditor", textEditor}, {"LIBMUTTON", "gpgID", gpgID}, {"LIBMUTTON", "sshUser", sshUser}, {"LIBMUTTON", "sshIP", sshIP}, {"LIBMUTTON", "sshPort", sshPort}, {"LIBMUTTON", "sshKey", sshKey}, {"LIBMUTTON", "sshKeyProtected", strconv.FormatBool(sshKeyProtected)}, {"LIBMUTTON", "sshEntryRoot", "null"}, {"LIBMUTTON", "sshIsWindows", "null"}}, false) // generate and register device ID sshEntryRoot, sshIsWindows := sync.DeviceIDGen() @@ -59,6 +59,6 @@ func TempInitCli() { backend.DirInit(false) // write config file - backend.WriteConfig([][3]string{{"LIBMUTTON", "textEditor", textEditor}, {"LIBMUTTON", "gpgID", gpgID}}, false) + backend.WriteConfig([][3]string{{"MUTN", "textEditor", textEditor}, {"LIBMUTTON", "gpgID", gpgID}}, false) } }