password-store

Simple password manager using gpg and ordinary unix directories
git clone https://git.zx2c4.com/password-store
Log | Files | Refs | README | LICENSE

commit 5f3e0b36af40c1fc5991fce76e9998313d36c6ee
parent 0524ef9aad5e908c4062c2696a3b7a807bd494c7
Author: Theo Chatzimichos <tampakrap@gmail.com>
Date:   Tue, 27 Jan 2015 19:09:01 +0100

Strip ".gpg" from symlinks as well

Symlinks inside password-store make sense when using passff in firefox, and
have the same LDAP password in different websites.

In order to have passff working correctly then, we need to strip the .gpg
extension from symlinks as well. Example output of `pass find site1` or `pass
| grep site1` before this commit:

    site1.job.com.gpg -> site2.job.com

and after:

    site1.job.com -> site2.job.com

Diffstat:
Msrc/password-store.sh | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/password-store.sh b/src/password-store.sh @@ -322,7 +322,7 @@ cmd_show() { else echo "${path%\/}" fi - tree -C -l --noreport "$PREFIX/$path" | tail -n +2 | sed 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}$/\1/' # remove .gpg at end of line, but keep colors + tree -C -l --noreport "$PREFIX/$path" | tail -n +2 | sed 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\( ->\|$\)/\1\2/g' # remove .gpg at end of line, but keep colors elif [[ -z $path ]]; then die "Error: password store is empty. Try \"pass init\"." else @@ -334,7 +334,7 @@ cmd_find() { [[ -z "$@" ]] && die "Usage: $PROGRAM $COMMAND pass-names..." IFS="," eval 'echo "Search Terms: $*"' local terms="*$(printf '%s*|*' "$@")" - tree -C -l --noreport -P "${terms%|*}" --prune --matchdirs --ignore-case "$PREFIX" | tail -n +2 | sed 's/\.gpg$//' + tree -C -l --noreport -P "${terms%|*}" --prune --matchdirs --ignore-case "$PREFIX" | tail -n +2 | sed 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\( ->\|$\)/\1\2/g' } cmd_grep() {