diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-04-22 18:39:47 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-04-22 18:39:47 +0200 |
commit | f82e9d6cf3bc3a12bdfce89bf319d76f79e66efc (patch) | |
tree | e3944c57ab37ca09dda2711aaaa68b72aa8d0a8c /.gitignore | |
parent | 760c644a1d9f55c91b74521b112958966e00ea31 (diff) |
zsh-completion: only remove next char if /
From Kevin:
I found a small bug in the zsh completions. Basically when the
PASSWORD_STORE_DIR ends in a slash the first character of the
result is eaten, making completion essentially useless. (It does
this before determining matches).
This can be fixed by changing what is line 106 in my version from:
_values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name
.gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}.##" -e 's#\.gpg##'
| sort)
to
_values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name
.gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}/\\?##" -e
's#\.gpg##' | sort)
The difference is the first sed regex expression. The original
version assumed that the next character was a slash and removed
it while the new version only removes it if it is a slash.
"s#${prefix}.##" -> "s#${prefix}/\\?##"
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reported-by: Kevin Cox <kevincox@kevincox.ca>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions