commit 9b251bcbb903ab282b9bfc585a05d9f7b658aa1c
parent 98ee47e09c374e03b4ecd71e37398ed25fc607e7
Author: Sean Enck <sean@ttypty.com>
Date: Sat, 15 Oct 2022 15:48:28 -0400
totp can be disabled at the root level
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/internal/cli/core.go b/internal/cli/core.go
@@ -162,13 +162,16 @@ func BashCompletions(defaults bool) ([]string, error) {
c.CanClip = isClip
c.ReadOnly = isReadOnly
c.CanTOTP = isTOTP
- options := []string{EnvCommand, FindCommand, HelpCommand, ListCommand, ShowCommand, TOTPCommand, VersionCommand}
+ options := []string{EnvCommand, FindCommand, HelpCommand, ListCommand, ShowCommand, VersionCommand}
if c.CanClip {
options = append(options, ClipCommand)
}
if !c.ReadOnly {
options = append(options, MoveCommand, RemoveCommand, InsertCommand)
}
+ if c.CanTOTP {
+ options = append(options, TOTPCommand)
+ }
c.Options = options
t, err := template.New("t").Parse(bashCompletions)
if err != nil {