mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-09-05 16:47:20 -04:00
Revert use of ":" for options on Windows, use "-" but replace "-p" with "-pw" to avoid ambiguity, interpret no options as "password"
This commit is contained in:
@@ -34,7 +34,7 @@ func EntryReader(decryptedEntry []string, hidePassword bool, sync bool) {
|
|||||||
if !hidePassword {
|
if !hidePassword {
|
||||||
fmt.Print(ansiDirectoryHeader + "Password:" + offline.AnsiReset + "\n" + ansiShownPassword + decryptedEntry[0] + offline.AnsiReset + "\n\n")
|
fmt.Print(ansiDirectoryHeader + "Password:" + offline.AnsiReset + "\n" + ansiShownPassword + decryptedEntry[0] + offline.AnsiReset + "\n\n")
|
||||||
} else {
|
} else {
|
||||||
fmt.Print(ansiDirectoryHeader + "Password:" + offline.AnsiReset + "\n" + ansiEmptyDirectoryWarning + "End command in \"show\" or \"" + OptionFlag + "s\" to view" + offline.AnsiReset + "\n\n")
|
fmt.Print(ansiDirectoryHeader + "Password:" + offline.AnsiReset + "\n" + ansiEmptyDirectoryWarning + "End command in \"show\" or \"-s\" to view" + offline.AnsiReset + "\n\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
|
|||||||
+30
-29
@@ -20,8 +20,8 @@ This program comes with absolutely no warranty; type "mutn version" for details.
|
|||||||
` + ansiBold + "Usage:" + offline.AnsiReset + ` mutn [/<entry name> [argument] [option]] | [argument]
|
` + ansiBold + "Usage:" + offline.AnsiReset + ` mutn [/<entry name> [argument] [option]] | [argument]
|
||||||
|
|
||||||
` + ansiBold + "Arguments:" + offline.AnsiReset + `
|
` + ansiBold + "Arguments:" + offline.AnsiReset + `
|
||||||
help|` + OptionFlag + `h Bring up this menu
|
help|-h Bring up this menu
|
||||||
version|` + OptionFlag + `v Display version and license information
|
version|-v Display version and license information
|
||||||
init Set up MUTN (generates libmutton.ini)
|
init Set up MUTN (generates libmutton.ini)
|
||||||
tweak Change configuration options
|
tweak Change configuration options
|
||||||
add Add an entry
|
add Add an entry
|
||||||
@@ -33,26 +33,27 @@ This program comes with absolutely no warranty; type "mutn version" for details.
|
|||||||
|
|
||||||
` + ansiBold + "Options:" + offline.AnsiReset + `
|
` + ansiBold + "Options:" + offline.AnsiReset + `
|
||||||
add:
|
add:
|
||||||
password|` + OptionFlag + `p Add a password entry
|
password|-pw Add a password entry
|
||||||
note|` + OptionFlag + `n Add a note entry
|
note|-n Add a note entry
|
||||||
folder|` + OptionFlag + `f Add a new folder for entries
|
folder|-f Add a new folder for entries
|
||||||
edit:
|
edit:
|
||||||
rename|` + OptionFlag + `r Rename or relocate an entry
|
rename|-r Rename or relocate an entry
|
||||||
username|` + OptionFlag + `u Change the username of an entry
|
username|-u Change the username of an entry
|
||||||
password|` + OptionFlag + `p Change the password of an entry
|
password|-pw Change the password of an entry
|
||||||
url|` + OptionFlag + `l Change the url attached to an entry
|
url|-l Change the url attached to an entry
|
||||||
note|` + OptionFlag + `n Change the note attached to an entry
|
note|-n Change the note attached to an entry
|
||||||
copy:
|
copy:
|
||||||
username|` + OptionFlag + `u Copy the username of an entry to your clipboard
|
username|-u Copy the username of an entry to your clipboard
|
||||||
password|` + OptionFlag + `p Copy the password of an entry to your clipboard
|
password|-pw Copy the password of an entry to your clipboard
|
||||||
url|` + OptionFlag + `l Copy the url of an entry to your clipboard
|
url|-l Copy the url of an entry to your clipboard
|
||||||
note|` + OptionFlag + `n Copy the note of an entry to your clipboard
|
note|-n Copy the note of an entry to your clipboard
|
||||||
gen:
|
gen:
|
||||||
update|` + OptionFlag + `u Generate a password for an existing entry
|
update|-u Generate a password for an existing entry
|
||||||
|
|
||||||
` + ansiBold + "Tip 1:" + offline.AnsiReset + ` You can quickly read an entry with "mutn /<entry name>"
|
` + ansiBold + "Tip 1:" + offline.AnsiReset + ` You can quickly read an entry with "mutn /<entry name>"
|
||||||
` + ansiBold + "Tip 2:" + offline.AnsiReset + ` Type "mutn" (no arguments/options) to view a list of saved entries
|
` + ansiBold + "Tip 2:" + offline.AnsiReset + ` Type "mutn" (no arguments/options) to view a list of saved entries
|
||||||
` + ansiBold + "Tip 3:" + offline.AnsiReset + " Provide \"add\", \"edit\", \"copy\", or \"gen\" as the only argument to receive more specific help\n\n")
|
` + ansiBold + "Tip 3:" + offline.AnsiReset + ` Provide "add", "edit", "copy", or "gen" as the only argument to receive more specific help\n\n
|
||||||
|
` + ansiBold + "Tip 4:" + offline.AnsiReset + " Using \"add\", \"edit\", or \"copy\" without specifying an option (field) will default to \"password\"\n\n")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,9 +62,9 @@ func HelpAdd() {
|
|||||||
|
|
||||||
` + ansiBold + "Options:" + offline.AnsiReset + `
|
` + ansiBold + "Options:" + offline.AnsiReset + `
|
||||||
add:
|
add:
|
||||||
password|` + OptionFlag + `p Add a password entry
|
password|-pw Add a password entry
|
||||||
note|` + OptionFlag + `n Add a note entry
|
note|-n Add a note entry
|
||||||
folder|` + OptionFlag + `f Add a new folder for entries` + "\n\n")
|
folder|-f Add a new folder for entries` + "\n\n")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,11 +73,11 @@ func HelpEdit() {
|
|||||||
|
|
||||||
` + ansiBold + "Options:" + offline.AnsiReset + `
|
` + ansiBold + "Options:" + offline.AnsiReset + `
|
||||||
edit:
|
edit:
|
||||||
rename|` + OptionFlag + `r Rename or relocate an entry
|
rename|-r Rename or relocate an entry
|
||||||
username|` + OptionFlag + `u Change the username of an entry
|
username|-u Change the username of an entry
|
||||||
password|` + OptionFlag + `p Change the password of an entry
|
password|-pw Change the password of an entry
|
||||||
url|` + OptionFlag + `l Change the url attached to an entry
|
url|-l Change the url attached to an entry
|
||||||
note|` + OptionFlag + `n Change the note attached to an entry` + "\n\n")
|
note|-n Change the note attached to an entry` + "\n\n")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,10 +86,10 @@ func HelpCopy() {
|
|||||||
|
|
||||||
` + ansiBold + "Options:" + offline.AnsiReset + `
|
` + ansiBold + "Options:" + offline.AnsiReset + `
|
||||||
copy:
|
copy:
|
||||||
username|` + OptionFlag + `u Copy the username in an entry to your clipboard
|
username|-u Copy the username in an entry to your clipboard
|
||||||
password|` + OptionFlag + `p Copy the password in an entry to your clipboard
|
password|-pw Copy the password in an entry to your clipboard
|
||||||
url|` + OptionFlag + `l Copy the url in an entry to your clipboard
|
url|-l Copy the url in an entry to your clipboard
|
||||||
note|` + OptionFlag + `n Copy the first note line in an entry to your clipboard` + "\n\n")
|
note|-n Copy the first note line in an entry to your clipboard` + "\n\n")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +98,7 @@ func HelpGen() {
|
|||||||
|
|
||||||
` + ansiBold + "Options:" + offline.AnsiReset + `
|
` + ansiBold + "Options:" + offline.AnsiReset + `
|
||||||
gen:
|
gen:
|
||||||
update|` + OptionFlag + `u Generate a password for an existing entry
|
update|-u Generate a password for an existing entry
|
||||||
|
|
||||||
` + ansiBold + "Tip:" + offline.AnsiReset + " If no options are provided, a new password entry is generated\n\n")
|
` + ansiBold + "Tip:" + offline.AnsiReset + " If no options are provided, a new password entry is generated\n\n")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
//go:build !windows
|
|
||||||
|
|
||||||
package cli
|
|
||||||
|
|
||||||
const OptionFlag = "-"
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
//go:build windows
|
|
||||||
|
|
||||||
package cli
|
|
||||||
|
|
||||||
const OptionFlag = ":"
|
|
||||||
Reference in New Issue
Block a user