mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-11 00:10:08 +00:00
fix(pass): completion for multiple repositories (#12464)
This commit is contained in:
parent
071b8f8921
commit
a4424dfefd
1 changed files with 5 additions and 2 deletions
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
_pass () {
|
_pass () {
|
||||||
local cmd
|
local cmd
|
||||||
|
local rootcontext
|
||||||
|
rootcontext=$curcontext
|
||||||
if (( CURRENT > 2)); then
|
if (( CURRENT > 2)); then
|
||||||
cmd=${words[2]}
|
cmd=${words[2]}
|
||||||
# Set the context for the subcommand.
|
# Set the context for the subcommand.
|
||||||
|
@ -123,7 +125,8 @@ _pass_cmd_show () {
|
||||||
_pass_complete_entries_helper () {
|
_pass_complete_entries_helper () {
|
||||||
local IFS=$'\n'
|
local IFS=$'\n'
|
||||||
local prefix
|
local prefix
|
||||||
zstyle -s ":completion:${curcontext}:" prefix prefix || prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
|
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):-""}
|
_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):-""}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue