[pass] [PATCH 0/3] Change output format of `pass grep`

Lucas Hoffmann l-m-h at web.de
Tue Aug 18 11:11:37 CEST 2015


On Tue, Aug 18, 2015 at 07:05:31AM +0000, Dahlberg, David wrote:
> While I can patch the --color out without much of a problem, I fear
> complications might arise with --label as this changes the textual
> output if missing and future functions might rely on the exact string.
> (You're using scripting as an argument yourself).

Do you mean that some other internal part of pass might use the cmd_grep
function and therefore rely on the grep behaviour?  I deem this
unlikely.  But this point is not very important, more interesting is the
next.

> Would it be possible to replace --label/-H with cut/echo or sed?

I think it is possible to implement the --label stuff with a pipeline.
But I am currently thinking about a different approach:  If GNU grep is
available we can set some default options including color and label and
if it is not available we can fall back to some default options that
work with POSIX grep.  This way we do not reimplement features of GNU
grep in pass.  And every user will get a "sane" default behaviour
corresponding to the feature set of the available grep.

I think this should be done with the platform mechanisms that pass
already uses.  But I have to understand them first before I can send the
patch.  I hope to do it soon though.

Lucas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20150818/d5e070c4/attachment.asc>


More information about the Password-Store mailing list