[PATCH] Escape colons in zsh completion to show url ports

Guido Cella guidocella91 at gmail.com
Mon Jul 13 14:00:23 CEST 2020


zsh completion cuts filenames after colons, for example port numbers.
This is fixed by escaping colons.
---
 src/completion/pass.zsh-completion | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/completion/pass.zsh-completion b/src/completion/pass.zsh-completion
index 27ce15a..192bca2 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#\\#\\\\#' -e 's#:#\\:#' | sort):-""}
 }
 
 _pass_complete_entries_with_subdirs () {
-- 
2.27.0



More information about the Password-Store mailing list