<div dir="ltr"><div>Hi all,</div><div><br></div><div>I found that in zsh, even if we set the following according to the instructions, the completion still doesn't work for subcommands:</div><div><br></div><div>> zstyle ':completion::complete:workpass::' prefix "$HOME/work/pass" </div><div><br></div><div>This patch fixes this and allow the subcommand to have correct completions.</div><div><br></div><div>Best,</div><div>Yong-Siang Shih</div><div><br></div><div>diff --git src/completion/pass.zsh-completion src/completion/pass.zsh-completion</div><div>index 27ce15a..c0f5b64 100644</div><div>--- src/completion/pass.zsh-completion</div><div>+++ src/completion/pass.zsh-completion</div><div>@@ -20,6 +20,8 @@</div><div> </div><div> _pass () {</div><div>        local cmd</div><div>+       local rootcontext</div><div>+       rootcontext=$curcontext</div><div>        if (( CURRENT > 2)); then</div><div>                cmd=${words[2]}</div><div>                # Set the context for the subcommand.</div><div>@@ -123,7 +125,7 @@ _pass_cmd_show () {</div><div> _pass_complete_entries_helper () {</div><div>        local IFS=$'\n'</div><div>        local prefix</div><div>-       zstyle -s ":completion:${curcontext}:" prefix prefix || prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}"</div><div>+       zstyle -s ":completion:${rootcontext}:" prefix prefix || prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}"</div><div>        _values -C 'passwords' ${$(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print 2>/dev/null | sed -e "s#${prefix}/\{0,1\}##" -e 's#\.gpg##' -e 's#\\#\\\\#' | sort):-""}</div><div> }</div></div>