[pass] [PATCH] Added functionality to retrieve username from a password file and copy to clipboard.

Jason A. Donenfeld Jason at zx2c4.com
Tue Oct 9 11:45:11 CEST 2012


On Sun, Oct 7, 2012 at 9:35 PM, ged <ged at qube.io> wrote:
> This requires a multiline password file with a line for the user as follows:
>
> user: FredFlintstone
>
> Case is ignored. Field seperator is ": " and everything after the field seperator is treated as the username.
>

Hi Ged,

Generally, we're trying to keep pass schema-less, per the discussion
here [1]. First we start with --username, then we add --email, and
then we add --website, and before you know it, we're totally out of
control.

I could imagine a more general key-value system, deliminated by the
colon, but you already get key-value via the directory structure /
file name correspondence.

I think what I'd suggest for this patch is to just use a bash function
if you want that functionality.

passuser() { pass "$@" | grep "User:" | cut -d : -f 2 | xclip...

Either that, or use the directory structure key-value system suggested in [1].

Jason


[1] http://zx2c4.com/projects/password-store/#organization



More information about the Password-Store mailing list