From df236271baefd67d89c4c03240c9d0ccd1850b46 Mon Sep 17 00:00:00 2001 From: Dominik Schulz Date: Thu, 4 Mar 2021 21:01:39 +0100 Subject: [PATCH] Honor --password flag Do not print the output header when --password/-o is given. RELEASE_NOTES=[BUGFIX] Fix -o Fixes #1821 Signed-off-by: Dominik Schulz --- internal/action/show.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/action/show.go b/internal/action/show.go index beed03c426..6da337b78c 100644 --- a/internal/action/show.go +++ b/internal/action/show.go @@ -164,7 +164,7 @@ func (s *Action) showHandleOutput(ctx context.Context, name string, sec gopass.S } ctx = out.WithNewline(ctx, ctxutil.IsTerminal(ctx)) - if ctxutil.IsTerminal(ctx) { + if ctxutil.IsTerminal(ctx) && !IsPasswordOnly(ctx) { header := fmt.Sprintf("Secret: %s\n", name) if HasKey(ctx) { header += fmt.Sprintf("Key: %s\n", GetKey(ctx))