Port to latest libmutton development version

This commit is contained in:
2025-05-30 00:38:59 -04:00
parent 5af8caf680
commit 1370f5cd80
5 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ 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/go-boilerplate v0.0.0-20250529185306-e2e64d7fa43b github.com/rwinkhart/go-boilerplate v0.0.0-20250529185306-e2e64d7fa43b
github.com/rwinkhart/libmutton v0.3.2-0.20250530020557-a1c47b06a13e github.com/rwinkhart/libmutton v0.3.2-0.20250530043633-6e74e37e5bd2
golang.org/x/term v0.32.0 golang.org/x/term v0.32.0
) )
+2 -2
View File
@@ -61,8 +61,8 @@ github.com/rwinkhart/go-boilerplate v0.0.0-20250529185306-e2e64d7fa43b h1:ENgsUl
github.com/rwinkhart/go-boilerplate v0.0.0-20250529185306-e2e64d7fa43b/go.mod h1:cnzIF45I0FCOvE4YIB+26pLCUx2kWyY2llKYZruNaRY= github.com/rwinkhart/go-boilerplate v0.0.0-20250529185306-e2e64d7fa43b/go.mod h1:cnzIF45I0FCOvE4YIB+26pLCUx2kWyY2llKYZruNaRY=
github.com/rwinkhart/go-winio-easy-pipe-handles v0.0.0-20250407031321-96994a0e8410 h1:NhHwFM3Pgm6zRUfFKvi0p5ndjfFbVWsRwmmhyFlG4PE= github.com/rwinkhart/go-winio-easy-pipe-handles v0.0.0-20250407031321-96994a0e8410 h1:NhHwFM3Pgm6zRUfFKvi0p5ndjfFbVWsRwmmhyFlG4PE=
github.com/rwinkhart/go-winio-easy-pipe-handles v0.0.0-20250407031321-96994a0e8410/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/rwinkhart/go-winio-easy-pipe-handles v0.0.0-20250407031321-96994a0e8410/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/rwinkhart/libmutton v0.3.2-0.20250530020557-a1c47b06a13e h1:b+4AzdZj5gEbIg8riqP5W4Y5LG7tIZTbiV69af846jI= github.com/rwinkhart/libmutton v0.3.2-0.20250530043633-6e74e37e5bd2 h1:XXpL+jd2FLh1XoxaDY0ANgWAHKzf2D6tlbkBSyY+jhg=
github.com/rwinkhart/libmutton v0.3.2-0.20250530020557-a1c47b06a13e/go.mod h1:uIz4AJcXW7ZHvvoPlLNWQofTBIbFa1UJ2JI6O+FSQ60= github.com/rwinkhart/libmutton v0.3.2-0.20250530043633-6e74e37e5bd2/go.mod h1:uIz4AJcXW7ZHvvoPlLNWQofTBIbFa1UJ2JI6O+FSQ60=
github.com/rwinkhart/peercred-mini v0.1.0 h1:TiS6u8cEWzW55S9X4iVpU72Iuy/NG6rMUJMtUEVEFLw= github.com/rwinkhart/peercred-mini v0.1.0 h1:TiS6u8cEWzW55S9X4iVpU72Iuy/NG6rMUJMtUEVEFLw=
github.com/rwinkhart/peercred-mini v0.1.0/go.mod h1:+x4Mxc2veE+YePSOpcUasjimh7n799c1KraLuQwHR20= github.com/rwinkhart/peercred-mini v0.1.0/go.mod h1:+x4Mxc2veE+YePSOpcUasjimh7n799c1KraLuQwHR20=
github.com/rwinkhart/rcw v0.2.0 h1:/rFgJ+20OSThipKAX5KPwW2xbPpgh1zl49THmEkkPis= github.com/rwinkhart/rcw v0.2.0 h1:/rFgJ+20OSThipKAX5KPwW2xbPpgh1zl49THmEkkPis=
+3 -3
View File
@@ -55,7 +55,7 @@ func main() {
case "add": case "add":
cli.AddEntry(targetLocation, true, 0) cli.AddEntry(targetLocation, true, 0)
case "shear": case "shear":
err := syncclient.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 err := syncclient.ShearRemoteFromClient(args[1]) // pass the incomplete path as the server and all clients (reading from the deletions directory) will have a different home directory
if err != nil { if err != nil {
back.PrintError("Failed to shear target: "+err.Error(), back.ErrorWrite, true) back.PrintError("Failed to shear target: "+err.Error(), back.ErrorWrite, true)
} }
@@ -160,7 +160,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":
err := syncclient.AddFolderRemoteFromClient(args[1], false) // pass the incomplete path as the server will have a different home directory err := syncclient.AddFolderRemoteFromClient(args[1]) // pass the incomplete path as the server will have a different home directory
if err != nil { if err != nil {
back.PrintError("Failed to add folder: "+err.Error(), back.ErrorWrite, true) back.PrintError("Failed to add folder: "+err.Error(), back.ErrorWrite, true)
} }
@@ -183,7 +183,7 @@ func main() {
case "startrcwd": case "startrcwd":
crypt.RCWDArgument() crypt.RCWDArgument()
case "sync": case "sync":
_, err := syncclient.RunJob(true, false) _, err := syncclient.RunJob(true)
if err != nil { if err != nil {
back.PrintError("Failed to sync entries: "+err.Error(), global.ErrorSyncProcess, true) back.PrintError("Failed to sync entries: "+err.Error(), global.ErrorSyncProcess, true)
} }
+2 -2
View File
@@ -17,7 +17,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 := front.Input("New location:") newLocationIncomplete := front.Input("New location:")
err := syncclient.RenameRemoteFromClient(oldLocationIncomplete, newLocationIncomplete, false) err := syncclient.RenameRemoteFromClient(oldLocationIncomplete, newLocationIncomplete)
if err != nil { if err != nil {
back.PrintError("Failed to rename entry: "+err.Error(), back.ErrorWrite, true) back.PrintError("Failed to rename entry: "+err.Error(), back.ErrorWrite, true)
} }
@@ -84,7 +84,7 @@ func editNote(baseNote []string) ([]string, bool) {
}(tempFile.Name()) }(tempFile.Name())
// fetch the user's text editor // fetch the user's text editor
editorCfg, _ := cfg.ParseConfig([][2]string{{"MUTN", "textEditor"}}, "") editorCfg, _ := cfg.ParseConfig([][2]string{{"MUTN", "textEditor"}})
editor := editorCfg[0] editor := editorCfg[0]
// write baseNote to tempFile (if it is not empty) // write baseNote to tempFile (if it is not empty)
+1 -1
View File
@@ -66,7 +66,7 @@ fieldLoop:
} }
if syncEnabled { if syncEnabled {
_, err := syncclient.RunJob(false, false) _, err := syncclient.RunJob(false)
if err != nil { if err != nil {
back.PrintError("Failed to sync entries: "+err.Error(), global.ErrorSyncProcess, true) back.PrintError("Failed to sync entries: "+err.Error(), global.ErrorSyncProcess, true)
} }