Port to newest libmutton development version

This commit is contained in:
2024-12-29 16:42:34 -05:00
parent 4933da4c37
commit 6d557a77c2
4 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ go 1.23.4
require (
github.com/Trojan2021/BEAN v0.0.0-20241210230804-8f294833b514
github.com/charmbracelet/glamour v0.7.0
github.com/rwinkhart/libmutton v0.2.5-0.20241228200917-a4a39a3a995d
github.com/rwinkhart/libmutton v0.2.5-0.20241229212818-fc2e77d8b80e
golang.org/x/term v0.27.0
)
+2 -2
View File
@@ -58,8 +58,8 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rwinkhart/convertroman v0.2.0 h1:otUm939eXT77q/Lr31mJtMwVWEw0RjEUB71gO65h9OM=
github.com/rwinkhart/convertroman v0.2.0/go.mod h1:Af6HqvX0EIM4Y3HcnNXbbRey1dLasGB7WU0+3Cowgmw=
github.com/rwinkhart/libmutton v0.2.5-0.20241228200917-a4a39a3a995d h1:o9fIg0X3BsGUnVQuQ7SqEDHkCCPFTZIxrrjC2sWmdxc=
github.com/rwinkhart/libmutton v0.2.5-0.20241228200917-a4a39a3a995d/go.mod h1:RLpxGyaNGqMgzRf7Qo4q4sBPnUH6Rjt8B6SE5Rp8gXM=
github.com/rwinkhart/libmutton v0.2.5-0.20241229212818-fc2e77d8b80e h1:SjVRasm0sgUOQYTSwnn9rHQhB1gIxsYDhdGOwAmnlIM=
github.com/rwinkhart/libmutton v0.2.5-0.20241229212818-fc2e77d8b80e/go.mod h1:RLpxGyaNGqMgzRf7Qo4q4sBPnUH6Rjt8B6SE5Rp8gXM=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+2 -2
View File
@@ -46,7 +46,7 @@ func main() {
case "add":
cli.AddEntry(targetLocation, true, 0)
case "shear":
sync.ShearRemoteFromClient(args[1]) // pass the incomplete path as the server and all clients (reading from the deletions directory) will have a different home directory
sync.ShearRemoteFromClient(args[1], false) // pass the incomplete path as the server and all clients (reading from the deletions directory) will have a different home directory
default:
cli.HelpMain()
}
@@ -145,7 +145,7 @@ func main() {
case "note", "-n":
cli.AddEntry(targetLocation, true, 2)
case "folder", "-f":
sync.AddFolderRemoteFromClient(args[1]) // pass the incomplete path as the server will have a different home directory
sync.AddFolderRemoteFromClient(args[1], false) // pass the incomplete path as the server will have a different home directory
default:
cli.HelpAdd()
}
+3 -2
View File
@@ -16,7 +16,7 @@ import (
func RenameCli(oldLocationIncomplete string) {
// prompt user for new location and rename
newLocationIncomplete := input("New location:")
sync.RenameRemoteFromClient(oldLocationIncomplete, newLocationIncomplete)
sync.RenameRemoteFromClient(oldLocationIncomplete, newLocationIncomplete, false)
// exit is done from sync.RenameRemoteFromClient
}
@@ -75,7 +75,8 @@ func editNote(baseNote []string) ([]string, bool) {
}(tempFile.Name())
// fetch the user's text editor
editor := core.ParseConfig([][2]string{{"MUTN", "textEditor"}}, "")[0]
editorCfg, _ := core.ParseConfig([][2]string{{"MUTN", "textEditor"}}, "")
editor := editorCfg[0]
// write baseNote to tempFile (if it is not empty)
if len(baseNote) > 0 {