Skip to content

Commit d5a4b60

Browse files
author
Anand
committed
ref issue #21 - Added assume-yes option for removal
1 parent 1e5a00b commit d5a4b60

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

main.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type CmdOption struct {
3232

3333
// Print the program's usage string and exit
3434
func printUsage() error {
35-
// getopt.Usage()
35+
// getopt.Usage()
3636
os.Exit(0)
3737

3838
return nil
@@ -102,8 +102,9 @@ func performAction(optMap map[string]interface{}) {
102102
}
103103

104104
flagsActionsMap := map[string]voidFunc{
105-
"show": setShowPasswords,
106-
"copy": setCopyPasswordToClipboard,
105+
"show": setShowPasswords,
106+
"copy": setCopyPasswordToClipboard,
107+
"assume-yes": setAssumeYes,
107108
}
108109

109110
// Flag actions - always done
@@ -168,7 +169,7 @@ func initializeCmdLine(parser *argparse.Parser) map[string]interface{} {
168169
{"I", "init", "Initialize a new database", "<path>", ""},
169170
{"d", "decrypt", "Decrypt password database", "<path>", ""},
170171
{"C", "clone", "Clone an entry with <id>", "<id>", ""},
171-
{"R", "remove", "Remove an entry with <id>", "<id>", ""},
172+
{"R", "remove", "Remove an entry with <id> or <id-range>", "<id>", ""},
172173
{"U", "use-db", "Set <path> as active database", "<path>", ""},
173174
{"f", "find", "Search entries with <term>", "<term>", ""},
174175
{"E", "edit", "Edit entry by <id>", "<id>", ""},
@@ -188,6 +189,7 @@ func initializeCmdLine(parser *argparse.Parser) map[string]interface{} {
188189
{"g", "genpass", "Generate a strong password (length: 12 - 16)", "", ""},
189190
{"s", "show", "Show passwords when listing entries", "", ""},
190191
{"c", "copy", "Copy password to clipboard", "", ""},
192+
{"y", "assume-yes", "Assume yes to actions requiring confirmation", "", ""},
191193
{"v", "version", "Show version information and exit", "", ""},
192194
{"h", "help", "Print this help message and exit", "", ""},
193195
}

0 commit comments

Comments
 (0)