<p dir="ltr">That's exactly what the repo I posted does in the script .load.bash</p>
<div class="gmail_extra"><br><div class="gmail_quote">On 16 Nov 2016 18:36, "Andrew Dunn" <<a href="mailto:andrew.g.dunn@gmail.com">andrew.g.dunn@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">I was able to get Adam's suggestions to work, albeit it required a bit<br>
of mucking about.<br>
<br>
You'd need to set an alias for each pass<team> or whatever convention<br>
you'd prefer to use:<br>
<br>
```<br>
vim ~/.bashrc<br>
---<br>
alias passered="PASSWORD_STORE_DIR=~<wbr>/.pass/red<br>
PASSWORD_STORE_GIT=~/.pass/red pass"<br>
alias passblue="PASSWORD_STORE_DIR=~<wbr>/.pass/blue<br>
PASSWORD_STORE_GIT=~/.pass/<wbr>blue pass"<br>
```<br>
<br>
The key here is that you set both the variables, otherwise git won't<br>
have any context when you use it.<br>
<br>
You then need to set your bash completion up, I'm on arch so the<br>
completion path may be different for you:<br>
<br>
```<br>
vim ~/.bash_completion<br>
---<br>
source /usr/share/bash-completion/<wbr>completions/pass<br>
<br>
_passred(){<br>
PASSWORD_STORE_DIR=~/.pass/<wbr>red/ _pass<br>
}<br>
<br>
complete -o filenames -o nospace -F _passred passred<br>
<br>
_passblue(){<br>
PASSWORD_STORE_DIR=~/.pass/<wbr>blue/ _pass<br>
}<br>
<br>
complete -o filenames -o nospace -F _passblue passblue<br>
<br>
```<br>
<br>
You need to have the trailing `/` on the PASSWORD_STORE_DIR path,<br>
otherwise your completion will look like `//` instead of actual<br>
folders within the directory.<br>
<br>
On Wed, Nov 16, 2016 at 10:47 AM, Héctor Rivas Gándara <<a href="mailto:keymon@gmail.com">keymon@gmail.com</a>> wrote:<br>
>> Adam:<br>
>><br>
>> Interesting suggestion! However, it appears that it might break the<br>
>> git completion when you do that... or maybe I set something up wrong?<br>
><br>
><br>
> I use this template git repo with some bash aliases:<br>
><br>
> <a href="https://github.com/keymon/password-store-for-teams" rel="noreferrer" target="_blank">https://github.com/keymon/<wbr>password-store-for-teams</a><br>
><br>
> I have multiple password stores for multiple teams.<br>
><br>
> Contributions are welcome, specially a equivalent for ksh and other shells.<br>
</blockquote></div></div>