[pass] 'pass find gpg' returns everything
Lenz Weber
mail at lenzw.de
Tue Jul 28 23:58:51 CEST 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
this SHOULD be as simple as making one change in this line:
tree -C -l --noreport -P "${terms%|*}" --prune --matchdirs
- --ignore-case "$PREFIX" | tail -n +2 | sed -E
's/\.gpg(\x1B\[[0-9]+m)?( ->|$)/\1\2/g'
from -P "${terms%|*}" to -P "${terms%|*}.gpg"
assuming all file names end in gpg - directories would not be matched
any more.
But I'm saying "should", as it actually doesn't work.
After some testing it looks to me that tree patterns seem to be buggy:
tree [...] -P "*test*.gpg" [...]
returns to me the same as
tree [...] -P "*test*" [...]
which are all files and directories containing "test", ignoring the
extension.
Disclaimer: I'm on a windows box and might have a strange version of
tree. Could someone on a linux box test this?
So to fix this without meddling with tree, we would need some awk
magic, and that could get a bit ugly.
Anyone got a better solution?
Regards,
Lenz
Am 28.07.2015 um 22:01 schrieb nfb:
> Hi all, as in the subject, trying to find 'gpg' with pass returns
> all entries in the password-store. This sould be a special case due
> to password entries names. Any idea about fixing this? Maybe strip
> off the '.gpg' suffix from every entry? Or a different search
> pattern hardcoded just for this special case? Thanks.
>
> nfb _______________________________________________ Password-Store
> mailing list Password-Store at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/password-store
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJVt/sYAAoJED87gGHnFM0sVFEIAIcjOlFrN6WbGbqbfh3rlonj
EOR9+n4R/Ka1TlQT17B+irhPnY4D7Pgxrh1ey5fcGbFQrP8ulusqamKcEAbzjl1q
sHkmgeaZLojkg9nrhGGReCPkym+rgJv9io80qaiHhJwZhJbLpLqekZbjNGillhqP
ExKhIf7DUYxbFSHu7tuANDSX6Mb5qz6n3XoKJITj5csbHM2xyGVeAMLRgc5b3XIO
CU1JGO6Sxb16+pSmXlsWJw59Ab3o50lcvbiG6ZeeM78l/SqHgtptY3499pZ4oLGb
GG/YGaUoWREZsJHg7Onya9NFlUIwDd8VA45hODnhEpywPj2vQZDoMKGZauaTP5I=
=9SGe
-----END PGP SIGNATURE-----
More information about the Password-Store
mailing list