mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-09-01 14:47:21 -04:00
Move text editor config under [MUTN] section header in libmutton.ini
This commit is contained in:
+1
-1
@@ -75,7 +75,7 @@ func editNote(baseNote []string) ([]string, bool) {
|
|||||||
}(tempFile.Name())
|
}(tempFile.Name())
|
||||||
|
|
||||||
// fetch the user's text editor
|
// 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)
|
// write baseNote to tempFile (if it is not empty)
|
||||||
if len(baseNote) > 0 {
|
if len(baseNote) > 0 {
|
||||||
|
|||||||
+2
-2
@@ -47,7 +47,7 @@ func TempInitCli() {
|
|||||||
backend.DirInit(false)
|
backend.DirInit(false)
|
||||||
|
|
||||||
// write config file (temporarily assigns sshEntryRoot and sshIsWindows to null to pass initial device ID registration)
|
// 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
|
// generate and register device ID
|
||||||
sshEntryRoot, sshIsWindows := sync.DeviceIDGen()
|
sshEntryRoot, sshIsWindows := sync.DeviceIDGen()
|
||||||
@@ -59,6 +59,6 @@ func TempInitCli() {
|
|||||||
backend.DirInit(false)
|
backend.DirInit(false)
|
||||||
|
|
||||||
// write config file
|
// 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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user