[pass] Completions for aliases (zsh)
Kevin Lyda
kevin at ie.suberic.net
Sat Jul 5 14:50:45 CEST 2014
Er, I forgot the arguments to the function. Correct snippet follows.
On Fri, Jul 4, 2014 at 10:16 PM, Kevin Lyda <kevin at ie.suberic.net> wrote:
> Perhaps everyone already knows this, but I couldn't find it anywhere.
> The nice folks on #zsh helped me (aka allowed me to remain ignorant of
> zsh completion syntax) so thought I'd share it here.
>
> Say you use pass for home and work. Home is just the pass command and
> those credentials live in the default place. Completions work great.
> You've aliased wpass to "PASSWORD_STORE_DIR=$HOME/.password-store-work
> pass" but completions don't work.
>
> Here's how you fix this. Step one is to remove the alias - this will
> need wpass to be a function. Once you do that, do this (this would
> likely go in you ~/.zshrc):
> [broken code snipped]
wpass() {
PASSWORD_STORE_DIR=$HOME/.password-store-work pass "$@"
}
compdef -e 'PASSWORD_STORE_DIR=$HOME/.password-store-work _pass' wpass
Sorry for the mistake there.
Kevin
--
Kevin Lyda
Galway, Ireland
US Citizen overseas? We can vote.
Register now: http://www.votefromabroad.org/
More information about the Password-Store
mailing list