lockbox

password manager
Log | Files | Refs | README | LICENSE

commit 28affbc72fc8e6755b321e9b4ca5a29816b58742
parent 4e698067708facd300f95d153b111176ea0783c6
Author: Sean Enck <sean@ttypty.com>
Date:   Mon,  6 Feb 2023 18:52:23 -0500

rekey should be 'rekey' and not a completion command

Diffstat:
Minternal/cli/core.go | 6+++---
Minternal/cli/core_test.go | 2+-
Mscripts/check.go | 2+-
Mscripts/doc.sections | 4++--
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/internal/cli/core.go b/internal/cli/core.go @@ -60,7 +60,8 @@ const ( BashCommand = "bash" // BashDefaultsCommand will generate environment agnostic completions BashDefaultsCommand = "-defaults" - ReKeyCommand = "key" + // ReKeyCommand will rekey the underlying database + ReKeyCommand = "rekey" ) //go:embed "completions.bash" @@ -165,7 +166,7 @@ func BashCompletions(defaults bool) ([]string, error) { c.CanClip = isClip c.ReadOnly = isReadOnly c.CanTOTP = isTOTP - options := []string{EnvCommand, FindCommand, HelpCommand, ListCommand, ShowCommand, VersionCommand, StatsCommand, ReKeyCommand} + options := []string{EnvCommand, FindCommand, HelpCommand, ListCommand, ShowCommand, VersionCommand, StatsCommand} if c.CanClip { options = append(options, ClipCommand) } @@ -206,7 +207,6 @@ func Usage() ([]string, error) { results = append(results, command(ListCommand, "", "list entries")) results = append(results, command(MoveCommand, "src dst", "move an entry from one location to another with the store")) results = append(results, command(RemoveCommand, "entry", "remove an entry from the store")) - results = append(results, command(ReKeyCommand, "", "rekey the database")) results = append(results, command(ShowCommand, "entry", "show the entry's value")) results = append(results, command(StatsCommand, "entry", "display entry detail information")) results = append(results, command(TOTPCommand, "entry", "display an updating totp generated code")) diff --git a/internal/cli/core_test.go b/internal/cli/core_test.go @@ -9,7 +9,7 @@ import ( func TestUsage(t *testing.T) { u, _ := cli.Usage() - if len(u) != 22 { + if len(u) != 21 { t.Errorf("invalid usage, out of date? %d", len(u)) } } diff --git a/scripts/check.go b/scripts/check.go @@ -133,7 +133,7 @@ func main() { os.Setenv("LOCKBOX_KEY_NEW", reKey) os.Setenv("LOCKBOX_KEYMODE_NEW", "plaintext") os.Setenv("LOCKBOX_KEYFILE_NEW", "") - runCommand([]string{"key"}, yes) + runCommand([]string{"rekey"}, yes) os.Setenv("LOCKBOX_STORE", reKeyStore) os.Setenv("LOCKBOX_KEYFILE", "") os.Setenv("LOCKBOX_KEY", reKey) diff --git a/scripts/doc.sections b/scripts/doc.sections @@ -22,7 +22,7 @@ commands to interact with (copy to/paste to) the clipboard. These settings can b via environment variables [totp] -By default lb tries to use some reasonable defaults to setup/manage oauth token inputs and +By default 'lb' tries to use some reasonable defaults to setup/manage oauth token inputs and displaying of code outputs. Many of these settings can be changed via environment variables [rekey] @@ -32,4 +32,4 @@ and store (as specified as environment variables) but with '_NEW' added as a suf [environment variables] -The following environment variables can alter how lb works +The following environment variables can alter how 'lb' works