summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-09-12 02:05:53 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-09-12 02:05:53 +0200
commit6ecdfe3844eec6e3d3f2d04c506c75114d97a5ec (patch)
treed52e674a1dd3cb2e1a61cd6ddb6d35e1dad6413d
parentf423a27d4da8a1b830e368d846880886470b22dd (diff)
downloadpass-6ecdfe3844eec6e3d3f2d04c506c75114d97a5ec.tar.gz
pass-6ecdfe3844eec6e3d3f2d04c506c75114d97a5ec.tar.bz2
pass-6ecdfe3844eec6e3d3f2d04c506c75114d97a5ec.zip
Use PASSWORD_STORE_DIR environment variable if it is set.
A user made this request: I was wondering whether it is in a planning to have multiple password-store directory trees or possible to achieve? eg. $HOME/.pwd-store-work and $HOME/.pwd-store-home. Maybe distinguish them with a command line switch and then create aliases in .bash_aliases? Why I'm asking is that I have multiple major password categories - personal, work etc. It'll be nice to keep them separate and under different repos. Reported-by: Simon KP <si@eskp.net>
-rw-r--r--man/pass.17
-rwxr-xr-xsrc/password-store.sh2
2 files changed, 5 insertions, 4 deletions
diff --git a/man/pass.1 b/man/pass.1
index c0b6e5d..4388401 100644
--- a/man/pass.1
+++ b/man/pass.1
@@ -19,7 +19,8 @@ pass - stores, retrieves, generates, and synchronizes passwords securely
is a very simple password store that keeps passwords inside
.BR gpg (1)
encrypted files inside a simple directory tree residing at
-.IR $HOME/.password-store .
+.IR $HOME/.password-store ,
+or the environment variable \fBPASSWORD_STORE_DIR\fP if it is set.
The
.B pass
utility provides a series of commands for manipulating the password store,
@@ -82,8 +83,8 @@ Insert a new password or edit an existing password using the default text editor
by the environment variable \fBEDITOR\fP or using
.BR vi (1)
as a fallback. This mode makes use of temporary files for editing, but care is taken to
-ensure that temporary files are created in \fB/dev/shm\fP in order to avoid writing to
-difficult-to-erase disk sectors. If \fB/dev/shm\fP is not accessible, fallback to
+ensure that temporary files are created in \fI/dev/shm\fP in order to avoid writing to
+difficult-to-erase disk sectors. If \fI/dev/shm\fP is not accessible, fallback to
the ordinary \fBTMPDIR\fP location, and print a warning.
.TP
\fBgenerate\fP [ \fI--no-symbols\fP, \fI-n\fP ] [ \fI--clip\fP, \fI-c\fP ] \fIpass-name pass-length\fP
diff --git a/src/password-store.sh b/src/password-store.sh
index b5b657f..fe306b7 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -5,7 +5,7 @@
umask 077
-PREFIX="$HOME/.password-store"
+PREFIX="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
ID="$PREFIX/.gpg-id"
GIT="$PREFIX/.git"
t/Makefile?h=1.7.3&id=30aa707312e8d4b8523d6483ecc137c9252ae1d8&follow=1'>bash-completion: fix completion-file's name in uninstallschalox1-1/+1 2014-04-19platform: Auto-detect local platform fileJason A. Donenfeld2-3/+3 2014-04-19platform: Allow custom platform file before installJason A. Donenfeld2-3/+5 2014-04-18reencrypt: cleaner temp file declarationJason A. Donenfeld1-4/+4 2014-04-18Remove unneeded semicolon.Jason A. Donenfeld1-14/+14 2014-04-18Check sneaky paths.Jason A. Donenfeld1-0/+15 2014-04-18Pruning: turns out rmdir does it for us with -p.Jason A. Donenfeld1-9/+3 2014-04-18Abstract remove empty directories into function.Jason A. Donenfeld1-14/+11 2014-04-18Remember to prune empty folders.Jason A. Donenfeld1-0/+8 2014-04-18init: allow deinitializationJason A. Donenfeld2-2/+18 2014-04-18bash-completion: filter dot files from resultsJason A. Donenfeld1-3/+8 2014-04-18reencrypt: remove option, do automaticallyJason A. Donenfeld5-39/+25 2014-04-18reencryption: add to completion filesJason A. Donenfeld3-1/+5 2014-04-18Specify variable gpg.Jason A. Donenfeld1-1/+1 2014-04-18style: don't escape new line on &&Jason A. Donenfeld1-2/+2 2014-04-18reencryption: remove temporary file on failureJason A. Donenfeld1-1/+1 2014-04-18reencryption: only reencrypt files when requiredJason A. Donenfeld2-16/+37 2014-04-17cp: typo as cvJason A. Donenfeld1-1/+1 2014-04-17bash: gpg_id is localJason A. Donenfeld1-0/+1 2014-04-17move/copy: always reencrypt passwords at destinationJason A. Donenfeld5-25/+56 2014-04-17makefile: allow platform files with gnu sedJason A. Donenfeld1-7/+8 2014-04-17mv: Add pass mv/rename supportJason A. Donenfeld5-3/+78 2014-04-17revelation2pass: add plain XML importJavali1-11/+15 2014-04-17platform: add cygwin supportJason A. Donenfeld2-1/+17