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">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>