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 9ed79aacd5ef54b9f19f0b91c000f13f46ec76ab
parent 4d53be77860a35db40bf616ef4c4b5d54dabb395
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Sun, 29 Jun 2014 01:44:41 +0200

Allow options in EDITOR variable

This is required by most graphical editors, as the shell command they
provide needs to be told to wait until the file has been closed.

This reverts '311c98c9140205f32be2720db9261c67da658c4c'. We thus use
PATH so that the tests still pass in directories with spaces.

Diffstat:
Msrc/password-store.sh | 2+-
Mtests/t0200-edit-tests.sh | 3++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/password-store.sh b/src/password-store.sh @@ -425,7 +425,7 @@ cmd_edit() { $GPG -d -o "$tmp_file" "${GPG_OPTS[@]}" "$passfile" || exit 1 action="Edit" fi - "${EDITOR:-vi}" "$tmp_file" + ${EDITOR:-vi} "$tmp_file" while ! $GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile" "${GPG_OPTS[@]}" "$tmp_file"; do echo "GPG encryption failed. Retrying." sleep 1 diff --git a/tests/t0200-edit-tests.sh b/tests/t0200-edit-tests.sh @@ -8,7 +8,8 @@ test_expect_success 'Test "edit" command' ' "$PASS" init $KEY1 && "$PASS" generate cred1 90 && export FAKE_EDITOR_PASSWORD="big fat fake password" && - export EDITOR="$TEST_HOME/fake-editor-change-password.sh" && + export PATH="$TEST_HOME:$PATH" + export EDITOR="fake-editor-change-password.sh" && "$PASS" edit cred1 && [[ $("$PASS" show cred1) == "$FAKE_EDITOR_PASSWORD" ]] '