diff options
author | Roderik Muit <rm@wyz.biz> | 2021-12-28 20:34:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-28 20:34:05 +0100 |
commit | b8e4aa2b0cf53301f7decbbea7ab210cefa31e59 (patch) | |
tree | 23cc6dc4a21fd2f36ceb23c74fb0b0853fe15231 | |
parent | 43046cdb35547c9dfbfe474197b2d9dc696edef3 (diff) | |
download | zsh-b8e4aa2b0cf53301f7decbbea7ab210cefa31e59.tar.gz zsh-b8e4aa2b0cf53301f7decbbea7ab210cefa31e59.tar.bz2 zsh-b8e4aa2b0cf53301f7decbbea7ab210cefa31e59.zip |
fix(pass): update `pass` completion to ff5ac38 (#9761)
This fixes a problem when completion filenames with colons.
Source: https://git.zx2c4.com/password-store/commit/?id=ff5ac38f7984d7b3d2912dba106baa2fed52e530
-rw-r--r-- | plugins/pass/_pass | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/plugins/pass/_pass b/plugins/pass/_pass index 75f3feb4f..d911e122f 100644 --- a/plugins/pass/_pass +++ b/plugins/pass/_pass @@ -6,8 +6,7 @@ # Brian Mattern <rephorm@rephorm.com> # Jason A. Donenfeld <Jason@zx2c4.com>. # All Rights Reserved. -# This file is licensed under the GPLv2+. -# Please visit https://git.zx2c4.com/password-store/tree/COPYING for more information. +# This file is licensed under the GPLv2+. Please see COPYING for more information. # If you use multiple repositories, you can configure completion like this: @@ -18,14 +17,6 @@ # PASSWORD_STORE_DIR=$HOME/work/pass pass $@ # } -# If you use multiple repositories, you can configure completion like this: -# -# compdef _pass workpass -# zstyle ':completion::complete:workpass::' prefix "$HOME/work/pass" -# workpass() { -# PASSWORD_STORE_DIR=$HOME/work/pass pass $@ -# } - _pass () { local cmd @@ -133,7 +124,7 @@ _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#\\#\\\\#' | 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):-""} } _pass_complete_entries_with_subdirs () { |