Skip to content

Add config option to show only the password by default #3621

Closed

Description

@sergluka

Summary

Please add a configuration option that makes gopass show output only the
password by default, equivalent to passing --password / -o.

For example:

gopass config show.password true

With this option enabled, these commands would behave like their current
-o equivalents:

gopass show example/account
gopass example/account

Motivation

For conventional password-store entries whose first line is the password,
this behavior is closer to the output users commonly get from pass. Providing
it as an option would make transitioning from pass to gopass easier and
less surprising.

Currently, users who want only the password must add -o to every invocation
or define a shell alias:

alias gopass='gopass -o'

The alias is broader than the intended behavior: it injects a global option
into every gopass subcommand, and -o takes precedence over other output
flags. A configuration option scoped to show would avoid those side effects.

Proposed behavior

  • The option defaults to false, preserving existing behavior.
  • It applies to both explicit gopass show SECRET and implicit
    gopass SECRET invocations.
  • It acts as the default only when no conflicting output-mode flag is supplied.
  • Explicit flags such as --clip, --alsoclip, --qr, or --qrbody override
    the configured default.

The exact configuration key is only a suggestion; show.password would be
consistent with other show-related settings.

Related issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureEnhancements and new features

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址