diff --git a/go.mod b/go.mod index 4c2a404..68760ee 100644 --- a/go.mod +++ b/go.mod @@ -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.20250116205734-55be8a30759e + github.com/rwinkhart/libmutton v0.2.5-0.20250119002915-fb5449cf1f75 golang.org/x/term v0.28.0 ) diff --git a/go.sum b/go.sum index b19f0ec..6e02c85 100644 --- a/go.sum +++ b/go.sum @@ -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.20250116205734-55be8a30759e h1:Mov+GEUtCXbrtpNzRCWaxdWhnmxYXa1IHXYMnkkXFdQ= -github.com/rwinkhart/libmutton v0.2.5-0.20250116205734-55be8a30759e/go.mod h1:kn7x0901qFyX1/HBxJf287zoySZkxKRMObKigLiI5Ok= +github.com/rwinkhart/libmutton v0.2.5-0.20250119002915-fb5449cf1f75 h1:vHUCzYT1ZWxaEGfF3Xhx2v2x/IQcmLqSp+46dgW4KPg= +github.com/rwinkhart/libmutton v0.2.5-0.20250119002915-fb5449cf1f75/go.mod h1:kn7x0901qFyX1/HBxJf287zoySZkxKRMObKigLiI5Ok= 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= diff --git a/src/cli/add.go b/src/cli/add.go index af78747..28d5258 100644 --- a/src/cli/add.go +++ b/src/cli/add.go @@ -48,5 +48,5 @@ func AddEntry(targetLocation string, hideSecrets bool, entryType uint8) { } // write and preview the new entry - writeEntryCLI(targetLocation, unencryptedEntry, hideSecrets, false) + writeEntryCLI(targetLocation, unencryptedEntry, hideSecrets) } diff --git a/src/cli/edit.go b/src/cli/edit.go index 78201cb..e3f4fa3 100644 --- a/src/cli/edit.go +++ b/src/cli/edit.go @@ -51,7 +51,7 @@ func EditEntryField(targetLocation string, hideSecrets bool, field int) { } // write and preview the modified entry - writeEntryCLI(targetLocation, unencryptedEntry, hideSecrets, false) + writeEntryCLI(targetLocation, unencryptedEntry, hideSecrets) } // GenUpdate generates a new password for an entry at targetLocation (user input). @@ -63,7 +63,7 @@ func GenUpdate(targetLocation string, hideSecrets bool) { unencryptedEntry[0] = core.StringGen(inputInt("Password length:", -1), inputBinary("Generate a complex (special characters) password?"), 0.2, false) // write and preview the modified entry - writeEntryCLI(targetLocation, unencryptedEntry, hideSecrets, false) + writeEntryCLI(targetLocation, unencryptedEntry, hideSecrets) } // editNote uses the user-specified text editor to edit an existing note (or create a new one if baseNote is empty). diff --git a/src/cli/utilitiesMisc.go b/src/cli/utilitiesMisc.go index 39f70a1..8f09e62 100644 --- a/src/cli/utilitiesMisc.go +++ b/src/cli/utilitiesMisc.go @@ -65,10 +65,10 @@ func inputMenuGen(prompt string, options []string) int { } // writeEntryCLI writes an entry to targetLocation and previews it (errors if no data is supplied). -func writeEntryCLI(targetLocation string, unencryptedEntry []string, hideSecrets, verifyEntryDoesNotExist bool) { +func writeEntryCLI(targetLocation string, unencryptedEntry []string, hideSecrets bool) { if core.EntryIsNotEmpty(unencryptedEntry) { // write the entry to the target location - core.WriteEntry(targetLocation, unencryptedEntry, verifyEntryDoesNotExist) + core.WriteEntry(targetLocation, unencryptedEntry) // preview the entry fmt.Println(AnsiBold + "\nEntry Preview:" + core.AnsiReset) EntryReader(unencryptedEntry, hideSecrets, true)