<div dir="ltr"><div>Hi Wouter,</div><div><br></div><div>I just managed to test your patch, it works as a charm for me, I would ask to include it to mainstream, if there no other suggestion the option name.</div><div><br></div><div>Thank you.<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 3, 2018 at 11:05 PM Wouter <<a href="mailto:info@lsof.nl">info@lsof.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>I see, so what do you think about my patch? If the flag had a
better name that is...</p>
<p>I do not really like how one flag causes two changes in
behaviour, but if the name reflects that (e.g.
'alternative_completion') it might be okay.<br>
</p>
<br>
<div class="m_4929652953748196526moz-cite-prefix">Op 03-07-18 om 22:24 schreef
<a class="m_4929652953748196526moz-txt-link-abbreviated" href="mailto:yanchenko.igor@gmail.com" target="_blank">yanchenko.igor@gmail.com</a>:<br>
</div></div><div text="#000000" bgcolor="#FFFFFF">
<blockquote type="cite">I
wanted to make a solution that I can manage by flags, not by
having a separate _pass file, that's what I mean by elegant
solution. <br>
<br>
<div class="gmail_quote">
<div dir="ltr">On Tue 3 Jul 2018, 22:20 Wouter, <<a href="mailto:info@lsof.nl" target="_blank">info@lsof.nl</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Op 03-07-18
om 15:57 schreef <a href="mailto:yanchenko.igor@gmail.com" target="_blank">yanchenko.igor@gmail.com</a>:<br>
> Hi Wouter,<br>
> I also prefer that behavior, I made a copy of _pass and
did this change:<br>
><br>
> 127c127<br>
> < _files -W $prefix -g '*.gpg(:r)'<br>
> ---<br>
> > _values -C 'passwords' ${$(find -L "$prefix"
\( -name .git -o <br>
> -name .gpg-id \) -prune -o $@ -print 2>/dev/null | sed
-e <br>
> "s#${prefix}/\{0,1\}##" -e 's#\.gpg##' -e 's#\\#\\\\#' |
sort):-""}<br>
><br>
> I didn't find more elegant solution.<br>
Hi Igor,<br>
<br>
Thank you, I actually like it. It's a rather clean solution
isn't it?<br>
<br>
I'd like to make it optional through zstyle so it can be
enabled without <br>
breaking current behaviour. Maybe eventually it could then be
committed <br>
to the repo. Something along the lines of this (although I had
no <br>
inspiration for a proper flag name):<br>
<br>
19a20,24<br>
> # By default, completed 'directories' within the store
will not have <br>
a trailing<br>
> # slash. Furthermore, the offered items will be looked
up <br>
recursively. To change<br>
> # this, set the 'no_recurse' flag to true as follows:<br>
> # `zstyle ':completion:*:*:pass:*' no_recurse true`.<br>
><br>
127c132,137<br>
< _values -C 'passwords' ${$(find -L "$prefix" \( -name
.git -o <br>
-name .gpg-id \) -prune -o $@ -print 2>/dev/null | sed -e <br>
"s#${prefix}/\{0,1\}##" -e 's#\.gpg##' -e 's#\\#\\\\#' |
sort):-""}<br>
---<br>
> zstyle -t ':completion:*:*:pass:*' no_recurse<br>
> if [ $? -eq 0 ]; then<br>
> _files -W $prefix -g '*.gpg(:r)'<br>
> else<br>
> _values -C 'passwords' ${$(find -L "$prefix" \(
-name .git -o <br>
-name .gpg-id \) -prune -o $@ -print 2>/dev/null | sed -e <br>
"s#${prefix}/\{0,1\}##" -e 's#\.gpg##' -e 's#\\#\\\\#' |
sort):-""}<br>
> fi<br>
<br>
Best regards,<br>
Wouter<br>
_______________________________________________<br>
Password-Store mailing list<br>
<a href="mailto:Password-Store@lists.zx2c4.com" target="_blank">Password-Store@lists.zx2c4.com</a><br>
<a href="https://lists.zx2c4.com/mailman/listinfo/password-store" rel="noreferrer" target="_blank">https://lists.zx2c4.com/mailman/listinfo/password-store</a><br>
</blockquote>
</div>
</blockquote>
<br>
</div>
_______________________________________________<br>
Password-Store mailing list<br>
<a href="mailto:Password-Store@lists.zx2c4.com" target="_blank">Password-Store@lists.zx2c4.com</a><br>
<a href="https://lists.zx2c4.com/mailman/listinfo/password-store" rel="noreferrer" target="_blank">https://lists.zx2c4.com/mailman/listinfo/password-store</a><br>
</blockquote></div>