From ff5ac38f7984d7b3d2912dba106baa2fed52e530 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Tue, 14 Jul 2020 06:35:37 +0200 Subject: Escape colons in zsh completion to show url ports zsh completion cuts filenames after colons, for example port numbers. This is fixed by escaping colons. This will also escape backslashes after the first. --- src/completion/pass.zsh-completion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/completion/pass.zsh-completion') diff --git a/src/completion/pass.zsh-completion b/src/completion/pass.zsh-completion index 27ce15a..d911e12 100644 --- a/src/completion/pass.zsh-completion +++ b/src/completion/pass.zsh-completion @@ -124,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 () { -- cgit v1.2.3