[pass] ***UNCHECKED*** Re: [Feature Request] Add a `--raw` option to `pass ls`

Linden Krouse ztaticnull at gmail.com
Thu Nov 10 08:45:34 CET 2016


While you could read the password directory directly, wouldn't it be better
for future compatibly to have pass print the raw key names? If pass ever
changes the way it stores it's passwords, every script relying on the
current layout will break. Also, `{ cd
${PASSWORD_STORE_DIR:-$HOME/.password-store};
find -type f -name '*.gpg' -printf "%P\n" | sed 's/\.gpg$//'; }` is much
longer and more difficult to read than `pass ls --raw` which
describes exactly what is being done. Having to do this repeatedly, or
create and store a script specifically to do this just adds more hassle to
pass.

Lastly, at least one other person has written a patch to add this feature
so it wouldn't take any additional effort to implement, as the work as
already been done.

On Wed, Nov 9, 2016 at 3:43 PM, Lenz Weber <mail at lenzw.de> wrote:

> Actually, if you want to write a software to use that ouput this should
> be quite intuitive for you, yes.
>
> Even simpler would be
>
> { cd ${PASSWORD_STORE_DIR:-$HOME/.password-store}; find -type f -name
> '*.gpg' -printf "%P\n" | sed 's/\.gpg$//'; }
>
> just don't forget the braces.
>
> Am 09.11.2016 um 21:22 schrieb Tobias Girstmair:
> >> TL;DR We don't need `pass ls --raw` because we have `ls -1`
> >
> > well, `ls -1` doesn't exactly provide a recursive output. this could be
> done with a convoluted tree statement (see my patch) or this find one
> (which isn't simpler, and I haven't checked for symlinks or other strange
> things):
> >
> >
> >     find ${PASSWORD_STORE_DIR:-$HOME/.password-store} -type f -name
> '*.gpg'|sed 's|^${PASSWORD_STORE_DIR:-$HOME/.password-store}/||'|sed
> 's/\.gpg$//'
> >
> >
> > intuitive, isn't it? ;-)
> >
> > Another use case is an interactive user, who wants to copy-paste a line
> of the `pass ls` output into `pass show`.
> >
> > -- Tobias
> > _______________________________________________
> > Password-Store mailing list
> > Password-Store at lists.zx2c4.com
> > http://lists.zx2c4.com/mailman/listinfo/password-store
>
>
>
> _______________________________________________
> Password-Store mailing list
> Password-Store at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/password-store
>



-- 
- Sent from my microwave oven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20161110/e3cc0e74/attachment.html>


More information about the Password-Store mailing list