[PATCH] Escape colons in zsh completion to show url ports
Guido Cella
guidocella91 at gmail.com
Tue Jul 14 06:35:37 CEST 2020
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(-)
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 () {
--
2.27.0
More information about the Password-Store
mailing list