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

Dahlberg, David david.dahlberg at fkie.fraunhofer.de
Tue Aug 18 13:58:52 CEST 2015


Am Dienstag, den 18.08.2015, 11:11 +0200 schrieb Lucas Hoffmann:

>If GNU grepis
> 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 guess Jason will have an opinion about that ;-)

So rather than the "$verbose" variable that I proposed before, maybe it
could be viable to have the basic functionality being implemented in
POSIX (+a few tools like bash, tree and gnupg) and to have additional
"convenience options" being defined separately and overloadable by the
plattform scripts:

| rm_opts="-v"
| mkdir_opts="-v"
| mv_opts="-v"
| cp_opts="-v"
| grep_opts="--color=auto"

And then call 

| cp $cp_opts foo bar


The next thing I will be doing however is playing a bit with "alias" in
the openbsd.sh to force the usage of tree[1] instead of tree[2],
hopefully unbreaking "make test". But while this is surely possible for
"tree", I am a bit reluctant to pull the whole GNU coreutils (>100 files
@bin!) into the requirements of a BSD port, when the added value is main
ly output cosmetics.

Still, as long as the difference is really only just cosmetics (i.e. it
will also work without the options), I am happy enough.

	David
 
[1] http://mama.indstate.edu/users/ice/progs.html 
[2] https://github.com/pyr/tree
> 
-- David Dahlberg     

Fraunhofer FKIE, Dept. Communication Systems (KOM) | Tel: +49-228-9435-845
Fraunhoferstr. 20, 53343 Wachtberg, Germany        | Fax: +49-228-856277


More information about the Password-Store mailing list