[pass] copying usernames and urls

Matthew Cengia mattcen at gmail.com
Wed Apr 30 04:17:13 CEST 2014


On 2014-04-29 22:06, Jason A. Donenfeld wrote:
> On Tue, Apr 29, 2014 at 8:44 PM, Matthieu Weber <mweber at free.fr> wrote:
> > Because these fields are closely related and keeping them in separate
> > files, even though it is technically possible, makes no sense imho.
> 
> While I see several reasons why using the filesystem might not be
> desired, what you've said completely fails to present an argument even
> remotely compelling. See if you can flesh this out a bit more.

Hi all,

I haven't read this entire thread in great detail, but I think I get the
general gist of it, and have some feedback:

The reason for pass's elegance, in my opinion, is its simplicity. When I
started using pass 8 months ago, it was 400 lines long. Now, only 8
months later, it's close to 600 lines.

Pass is a shell script. Shell scripts are designed to be glue that hold
other unix commands together, and Bash isn't a good enough language to
write files of this size. I think that, as a general rule, if a shell
script exceeds 500 lines (or perhaps something less), it's time to
rewrite it in a real scripting language like Python or Ruby.

When I first started using pass, I could basically read through the code
in 1 sitting, and understand most or all of what it was doing. It's
getting to the point that is no longer possible just due to the sheer
size of the codebase. I think that pass has been a severe victim of
feature-creep of late.

From the Intro page for pass
(http://www.zx2c4.com/projects/password-store/) "Password management
should be simple and follow Unix philosophy". I believe this was true
when I started using pass, as at version 1.4.2 (which, by the way, I'm
still using exclusively, because I have no need or desire for the recent
features). Most of the extra features I've seen recently are basically
wrappers around other shell programs, such as find, or the latest
version of tree (the dependence on which I still think is a mistake).

I moved to pass because I myself had written, as a university
assignment, a password manager that used gpg to store passwords. It was
600 lines when I stopped using it, and was in desperate need of a
rewrite. pass fit my needs perfectly. I acknowledge that I'm just a
single user among many, but I hope I'm not alone in thinking that all
these features are going a little too far.

If people want the ability to pull out individual RFC5322-style header
fields, why not write a small filter script to put in the contrib/
directory, and leave the core of pass alone? It could be invoked like
this:

  pass foo/bar | copyfield username

This is trivial to write:

  copyfield(){ sed -n "/^$1/Is/^[^[:space:]]\+ //p" | xsel ...; }

Grab a copy of clip() out of pass if you like, so that you've got the
fancy 45-second delay etc., but please don't pollute the core pass
codebase anymore, particularly for something as trivial as this that can
be done as a filter, exactly the way the Unix philosophy intended it to
be!

-- 
Regards,
Matthew Cengia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: Digital signature
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140430/14233587/attachment.asc>


More information about the Password-Store mailing list