mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-09-05 00:27:15 -04:00
Port to newest libmutton development version
This commit is contained in:
@@ -5,7 +5,7 @@ go 1.23.4
|
|||||||
require (
|
require (
|
||||||
github.com/Trojan2021/BEAN v0.0.0-20241210230804-8f294833b514
|
github.com/Trojan2021/BEAN v0.0.0-20241210230804-8f294833b514
|
||||||
github.com/charmbracelet/glamour v0.7.0
|
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
|
golang.org/x/term v0.27.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -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/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 h1:otUm939eXT77q/Lr31mJtMwVWEw0RjEUB71gO65h9OM=
|
||||||
github.com/rwinkhart/convertroman v0.2.0/go.mod h1:Af6HqvX0EIM4Y3HcnNXbbRey1dLasGB7WU0+3Cowgmw=
|
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.20241229212818-fc2e77d8b80e h1:SjVRasm0sgUOQYTSwnn9rHQhB1gIxsYDhdGOwAmnlIM=
|
||||||
github.com/rwinkhart/libmutton v0.2.5-0.20241228200917-a4a39a3a995d/go.mod h1:RLpxGyaNGqMgzRf7Qo4q4sBPnUH6Rjt8B6SE5Rp8gXM=
|
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.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
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=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ func main() {
|
|||||||
case "add":
|
case "add":
|
||||||
cli.AddEntry(targetLocation, true, 0)
|
cli.AddEntry(targetLocation, true, 0)
|
||||||
case "shear":
|
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:
|
default:
|
||||||
cli.HelpMain()
|
cli.HelpMain()
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@ func main() {
|
|||||||
case "note", "-n":
|
case "note", "-n":
|
||||||
cli.AddEntry(targetLocation, true, 2)
|
cli.AddEntry(targetLocation, true, 2)
|
||||||
case "folder", "-f":
|
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:
|
default:
|
||||||
cli.HelpAdd()
|
cli.HelpAdd()
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -16,7 +16,7 @@ import (
|
|||||||
func RenameCli(oldLocationIncomplete string) {
|
func RenameCli(oldLocationIncomplete string) {
|
||||||
// prompt user for new location and rename
|
// prompt user for new location and rename
|
||||||
newLocationIncomplete := input("New location:")
|
newLocationIncomplete := input("New location:")
|
||||||
sync.RenameRemoteFromClient(oldLocationIncomplete, newLocationIncomplete)
|
sync.RenameRemoteFromClient(oldLocationIncomplete, newLocationIncomplete, false)
|
||||||
|
|
||||||
// exit is done from sync.RenameRemoteFromClient
|
// exit is done from sync.RenameRemoteFromClient
|
||||||
}
|
}
|
||||||
@@ -75,7 +75,8 @@ func editNote(baseNote []string) ([]string, bool) {
|
|||||||
}(tempFile.Name())
|
}(tempFile.Name())
|
||||||
|
|
||||||
// fetch the user's text editor
|
// 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)
|
// write baseNote to tempFile (if it is not empty)
|
||||||
if len(baseNote) > 0 {
|
if len(baseNote) > 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user