[pass] [PATCH 2/2] User heredoc in gpg-id unset

Tom Vincent pass at tlvince.com
Sun May 26 19:38:09 CEST 2013


---
 src/password-store.sh | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/password-store.sh b/src/password-store.sh
index e080627..379a87e 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -179,10 +179,12 @@ esac
 if [[ -n $PASSWORD_STORE_KEY ]]; then
        ID="$PASSWORD_STORE_KEY"
 elif [[ ! -f $ID ]]; then
-       echo "You must run:"
-       echo "    $program init your-gpg-id"
-       echo "before you may use the password store."
-       echo
+       cat << _EOF
+You must run:
+    $program init your-gpg-id
+before you can use the password store.
+
+_EOF
        usage
        exit 1
 else
@@ -339,7 +341,7 @@ case "$command" in
                [[ -n $pass ]] || exit 1
                gpg2 -e -r "$ID" -o "$passfile" $GPG_OPTS <<<"$pass"
                git_add_file "$passfile" "Added generated password for
$path to store."
-
+
                if [[ $clip -eq 0 ]]; then
                        echo "The generated password to $path is:"
                        echo "$pass"
--
1.8.2.3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20130527/a0400de5/attachment.html>


More information about the Password-Store mailing list