mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-09-05 08:37:20 -04:00
Implement initial entry editing support (no notes editing or gen update)
This commit is contained in:
@@ -68,23 +68,21 @@ func main() {
|
||||
}
|
||||
offline.CopyArgument(targetLocation, field, args[0])
|
||||
case "edit":
|
||||
var field rune
|
||||
field = field // TODO temporary to avoid unused variable error
|
||||
var field int // indicates which field to edit
|
||||
switch args[3] {
|
||||
case "password", "-p":
|
||||
field = 'p'
|
||||
field = 0
|
||||
case "username", "-u":
|
||||
field = 'u'
|
||||
field = 1
|
||||
case "url", "-l":
|
||||
field = 'l'
|
||||
case "note", "-n":
|
||||
field = 'n'
|
||||
field = 2
|
||||
case "note", "-n": // TODO cli.EditNote(targetLocation), exit after run
|
||||
case "rename", "-r":
|
||||
cli.RenameCli(targetLocation)
|
||||
default:
|
||||
cli.HelpEdit()
|
||||
}
|
||||
// TODO offline.EditEntry(targetLocation, field), exit after run
|
||||
cli.EditEntry(targetLocation, true, field)
|
||||
case "add":
|
||||
switch args[3] {
|
||||
case "password", "-p":
|
||||
|
||||
Reference in New Issue
Block a user