commit 26ed57668177d4cee0c04a1f3a9cd39a035cacec
parent 3059ab19c41f10f81057f4e06f4ca4b72f42d9d1
Author: Sean Enck <sean@ttypty.com>
Date: Mon, 27 Mar 2023 18:41:53 -0400
allow -list as a bash completion for totp
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/internal/cli/completions.bash b/internal/cli/completions.bash
@@ -24,7 +24,7 @@ _{{ $.Executable }}() {
{{end}}
{{ if $.CanTOTP }}
"{{ $.TOTPCommand }}")
- opts="{{ $.TOTPShortCommand }} {{ $.TOTPOnceCommand }} "$({{ $.DoTOTPList }})
+ opts="{{ $.TOTPShortCommand }} {{ $.TOTPOnceCommand }} {{ $.TOTPListCommand }} "$({{ $.DoTOTPList }})
{{ if $.CanClip }}
opts="$opts {{ $.TOTPClipCommand }}"
{{end}}
diff --git a/internal/cli/core.go b/internal/cli/core.go
@@ -86,6 +86,7 @@ type (
TOTPShortCommand string
TOTPOnceCommand string
TOTPClipCommand string
+ TOTPListCommand string
InsertMultiCommand string
InsertTOTPCommand string
RemoveCommand string
@@ -139,6 +140,7 @@ func BashCompletions(defaults bool) ([]string, error) {
TOTPShortCommand: TOTPShortCommand,
TOTPClipCommand: TOTPClipCommand,
TOTPOnceCommand: TOTPOnceCommand,
+ TOTPListCommand: TOTPListCommand,
ClipCommand: ClipCommand,
ShowCommand: ShowCommand,
StatsCommand: StatsCommand,