diff --git a/README.md b/README.md index 2fdfea6..2608ffb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ twofat icon ## Manage TOTPs from CLI -* **v2.1.0** +* **v2.1.1** * Repo: [github.com/pepa65/twofat](https://github.com/pepa65/twofat) * After: [github.com/slandx/tfat](https://github.com/slandx/tfat) * Contact: github.com/pepa65 @@ -55,16 +55,16 @@ CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o twofat.exe ## Usage ``` -twofat v2.0.7 - Manage TOTPs from CLI +twofat v2.1.1 - Manage TOTPs from CLI The CLI is interactive & colorful, output to Stderr. Password can be piped in. When output is redirected, only pertinent plain text is sent to Stdout. * Repo: github.com/pepa65/twofat -* Data file: ~/.twofat.enc (default, depends on the binary's name) +* Datafile: ~/.twofat.enc (default, depends on the binary's name) * Usage: twofat [COMMAND] [ -d | --datafile DATAFILE ] == COMMAND: -[ show | view ] [[-c|--case] REGEX] +[ show | view ] [REGEX [ -c | --case ]] Display all TOTPs with NAMEs [matching REGEX] (show/view is optional). -list | ls [[-c|--case] REGEX] +list | ls [REGEX [ -c | --case ]] List all NAMEs [matching REGEX]. add | insert | entry NAME [TOTP-OPTIONS] [ -f | --force ] [SECRET] Add a new entry NAME with SECRET (queried when not given). @@ -84,10 +84,10 @@ clip | copy | cp NAME Put TOTP of entry NAME onto the clipboard. password | passwd | pw Change datafile encryption password. version | --version | -V Show version. help | --help | -h Show this help text. - == REGEX: Optional, case-insensitive matching (unless if -c/--case given) + == REGEX: Optional, case-insensitive matching (unless -c/--case is given). == TOTP-OPTIONS: --s | --size LENGTH TOTP length: 5-8 (default: 6) --a | --algorithm HASH Hash algorithm: SHA1/SHA256/SHA512 (default: SHA1) +-s | --size LENGTH TOTP length: 5-8 (default: 6). +-a | --algorithm HASH Hash algorithm: SHA1/SHA256/SHA512 (default: SHA1). ``` ### Import/Export data diff --git a/main.go b/main.go index 75cb719..68d1fd5 100644 --- a/main.go +++ b/main.go @@ -26,7 +26,7 @@ import ( ) const ( - version = "2.1.0" + version = "2.1.1" maxNameLen = 20 period = 30 ) @@ -919,8 +919,8 @@ func usage(err string) { green + "help" + def + " | " + green + "--help" + def + " | " + green + "-h" + def + " Show this help text.\n" + " == " + blue + "REGEX" + def + ": Optional, case-insensitive matching (unless " + yellow + "-c" + def + "/" + yellow + "--case" + def + " is given).\n" + " == " + yellow + "TOTP-OPTIONS" + def + ":\n" + - yellow + "-s" + def + " | " + yellow + "--size " + cyan + "LENGTH" + def + " TOTP length: " + cyan + "5" + def + "-" + cyan + "8" + def + " (default: " + cyan + "6" + def + ")\n" + - yellow + "-a" + def + " | " + yellow + "--algorithm " + cyan + "HASH" + def + " Hash algorithm: " + cyan + "SHA1" + def + "/" + cyan + "SHA256" + def + "/" + cyan + "SHA512" + def +" (default: " + cyan + "SHA1" + def + ")" + yellow + "-s" + def + " | " + yellow + "--size " + cyan + "LENGTH" + def + " TOTP length: " + cyan + "5" + def + "-" + cyan + "8" + def + " (default: " + cyan + "6" + def + ").\n" + + yellow + "-a" + def + " | " + yellow + "--algorithm " + cyan + "HASH" + def + " Hash algorithm: " + cyan + "SHA1" + def + "/" + cyan + "SHA256" + def + "/" + cyan + "SHA512" + def +" (default: " + cyan + "SHA1" + def + ")." fmt.Fprintln(os.Stderr, help) if err != "" { fmt.Fprintln(os.Stderr, red+"Abort: "+err)