<p dir="ltr">+1 to Matthew's comments.</p>
<p dir="ltr">I've been using my own find-based functions for a while happily and would like to understand what tree gets me.</p>
<p dir="ltr">Von</p>
<div class="gmail_quote">On Apr 14, 2014 10:34 AM, "Matthew Cengia" <<a href="mailto:mattcen@gmail.com">mattcen@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2014-04-14 15:02, Jason A. Donenfeld wrote:<br>
> Hi folks,<br>
><br>
> We now have the long-desired find/search command:<br>
> <a href="http://git.zx2c4.com/password-store/commit/?id=df83c64c102fb8c22535e5fd8fd2557c19671929" target="_blank">http://git.zx2c4.com/password-store/commit/?id=df83c64c102fb8c22535e5fd8fd2557c19671929</a><br>
><br>
> Unfortunately, we rely on a patch to tree for it:<br>
> <a href="http://git.zx2c4.com/password-store/tree/contrib/tree-1.6.0-matchdirs.patch" target="_blank">http://git.zx2c4.com/password-store/tree/contrib/tree-1.6.0-matchdirs.patch</a><br>
><br>
> Hopefully upstream tree will merge it, but I'm a bit doubtful. In<br>
> event that they don't, we probably need to start talking to distros to<br>
> popularize our patch and get it everywhere. Any ideas going forward<br>
> with this?<br>
<br>
Sorry, I've not really been following the purpose of the tree(1) patch<br>
and how it pertains to searching. Nonetheless, I don't really understand<br>
the attraction of tree(1). Yes, it gives pretty lines to show the<br>
directory hierarchy, but other than that, it mostly sounds like a<br>
hindrance. I'd just as soon use find(1). It's POSIX (so it'll probably<br>
work everywhere), and it's machine parseable. You can get a greppable<br>
lise using:<br>
<br>
(cd ~/.password-store/ && find -name \*.gpg)<br>
<br>
(on top of which you can trivially build search functionality)<br>
<br>
And a tree-like structure (without the pretty lines) using:<br>
<br>
(cd ~/.password-store/ && find *) | sort | sed 's|[^/]\+/| |g;s/\.gpg$//'<br>
<br>
Just my 2 cents.<br>
<br>
--<br>
Regards,<br>
Matthew Cengia<br>
<br>_______________________________________________<br>
Password-Store mailing list<br>
<a href="mailto:Password-Store@lists.zx2c4.com">Password-Store@lists.zx2c4.com</a><br>
<a href="http://lists.zx2c4.com/mailman/listinfo/password-store" target="_blank">http://lists.zx2c4.com/mailman/listinfo/password-store</a><br>
<br></blockquote></div>