From b8e4aa2b0cf53301f7decbbea7ab210cefa31e59 Mon Sep 17 00:00:00 2001 From: Roderik Muit Date: Tue, 28 Dec 2021 20:34:05 +0100 Subject: [PATCH] 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 --- plugins/pass/_pass | 13 ++----------- 1 file 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,18 +6,9 @@ # Brian Mattern # Jason A. Donenfeld . # 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: -# -# compdef _pass workpass -# zstyle ':completion::complete:workpass::' prefix "$HOME/work/pass" -# workpass() { -# PASSWORD_STORE_DIR=$HOME/work/pass pass $@ -# } - # If you use multiple repositories, you can configure completion like this: # # compdef _pass workpass @@ -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 () {