[pass] Feature request: templates and better clipboard support

Roland Berger roliberger at bluewin.ch
Sun Dec 8 22:28:07 CET 2013


Hi Jason

I came across your password manager "pass" and I love it.Thanks!

Here is what I miss an how I got around it and may be you're going to 
integrate it into pass in a better fashion than I did.

I organize all my data of a thing in the same multiline pass entry. 
Since there are a lot of different kinds of a thing I have to store 
(like normal usernames/passwords or database connections or creditcard 
numbers it would be cool to supply a template and fill in some data and 
store it with pass. Later it would be cool to extract any data, not only 
the password, and copy it to the clipboard.

Suppose we have a template like this for example called def-template:
password:
username:

I can pipe this to pass like so:

  * ptemp < ~/templates/def-template `pwgen -yvsB 15 1` foo | pass
    insert -m foo/bar.com


To see the result ...

  * pass show foo/bar.com

... it giving this

  * password:V}zp*/?9{L;;x%|
  * username:foo


Later to copy the password "V}zp*/?9{L;;x%|" to clipboard I can do like so:

  * pass show foo/bar.com | pclip passw

To copy the username "foo" to clipboard like so:

  * pass show foo/bar.com | pclip usern


Below are the functions pclip and ptemp from .bashrc. (Works on linux 
mint bash)

Would be cool if you could integrate a similar thing into pass only 
better than I did.

Have fun
Roland


function pclip {
   grep "$1" | awk -F ':' '{print $2}' | tr -d ' ' | xclip -se c

}

function ptemp {
i=0
args=( "$@" )
while read line
do
     echo ${line}${args[i]}
     let i++
done
}




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20131208/7f674d13/attachment.html>


More information about the Password-Store mailing list