diff options
| author | Lukas Grimm <ombre@ombre.ch> | 2024-05-30 17:05:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-30 17:05:50 +0200 |
| commit | a4424dfefd68e4d23badb2f86087184f9e06fab4 (patch) | |
| tree | d18541e5071dcb0889cb9f5f3f08fabff0eb78cf /plugins/pass/_pass | |
| parent | 071b8f8921cb2bbb1fcabbf3d271e77af0b12a7d (diff) | |
| download | zsh-a4424dfefd68e4d23badb2f86087184f9e06fab4.tar.gz zsh-a4424dfefd68e4d23badb2f86087184f9e06fab4.tar.bz2 zsh-a4424dfefd68e4d23badb2f86087184f9e06fab4.zip | |
fix(pass): completion for multiple repositories (#12464)
Diffstat (limited to 'plugins/pass/_pass')
| -rw-r--r-- | plugins/pass/_pass | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/pass/_pass b/plugins/pass/_pass index d911e122f..c66d99318 100644 --- a/plugins/pass/_pass +++ b/plugins/pass/_pass @@ -20,6 +20,8 @@ _pass () { local cmd + local rootcontext + rootcontext=$curcontext if (( CURRENT > 2)); then cmd=${words[2]} # Set the context for the subcommand. @@ -123,8 +125,9 @@ _pass_cmd_show () { _pass_complete_entries_helper () { local IFS=$'\n' local prefix - zstyle -s ":completion:${curcontext}:" prefix prefix || prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}" - _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#\\#\\\\#g' -e 's#:#\\:#g' | sort):-""} + zstyle -s ":completion:${rootcontext}:" prefix prefix || +prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}" + _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#\\#\\\\#g' -e 's#:#\\:#g' | sort):-""} } _pass_complete_entries_with_subdirs () { |
