summaryrefslogtreecommitdiff
path: root/src/password-store.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/password-store.sh')
-rwxr-xr-xsrc/password-store.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 4f2239f..3040a17 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -8,6 +8,7 @@ umask 077
GPG_OPTS="--quiet --yes --batch --compress-algo=none"
PREFIX="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
SELECTION="${PASSWORD_STORE_SELECTION:-clipboard}"
+CLIP_TIME="${PASSWORD_STORE_CLIP_TIME:-45}"
export GIT_DIR="${PASSWORD_STORE_GIT:-$PREFIX}/.git"
export GIT_WORK_TREE="${PASSWORD_STORE_GIT:-$PREFIX}"
@@ -29,14 +30,14 @@ usage() {
cat <<_EOF
Usage:
- $program init [--reencrypt,-e] gpg-id
+ $program init [--reencrypt,-e] [--path=subfolder,-p subfolder] gpg-id...
Initialize new password storage and use gpg-id for encryption.
Optionally reencrypt existing passwords using new gpg-id.
$program [ls] [subfolder]
List passwords.
$program [show] [--clip,-c] pass-name
Show existing password and optionally put it on the clipboard.
- If put on the clipboard, it will be cleared in 45 seconds.
+ If put on the clipboard, it will be cleared in $CLIP_TIME seconds.
$program insert [--echo,-e | --multiline,-m] [--force,-f] pass-name
Insert new password. Optionally, echo the password back to the console
during entry. Or, optionally, the entry may be multiline. Prompt before
@@ -120,7 +121,7 @@ clip() {
before="$(xclip -o -selection "$SELECTION" | base64)"
echo -n "$1" | xclip -selection "$SELECTION"
(
- ( exec -a "$sleep_argv0" sleep 45 )
+ ( exec -a "$sleep_argv0" sleep "$CLIP_TIME" )
now="$(xclip -o -selection "$SELECTION" | base64)"
[[ $now != $(echo -n "$1" | base64) ]] && before="$now"
@@ -135,7 +136,7 @@ clip() {
echo "$before" | base64 -d | xclip -selection "$SELECTION"
) 2>/dev/null & disown
- echo "Copied $2 to clipboard. Will clear in 45 seconds."
+ echo "Copied $2 to clipboard. Will clear in $CLIP_TIME seconds."
}
tmpdir() {
if [[ -d /dev/shm && -w /dev/shm && -x /dev/shm ]]; then
it/commit/debian/files?id=92b1693bfc64dd34ab3f381263d6346f3e5f6179&follow=1'>Bump debian version horribly.1.1Jason A. Donenfeld2-2/+2 2012-09-04No echo mode.Jason A. Donenfeld2-16/+42 2012-09-04Properly quote the path too.Jason A. Donenfeld1-1/+1 2012-09-04Allow passwords having spaces to go unbroken to the clipboard.Bernardo Freitas Paulo da Costa1-1/+1 2012-09-04Separate out the massive git example.Jason A. Donenfeld1-10/+14 2012-09-04Prepare for debianification.1.0Jason A. Donenfeld9-4/+60 2012-09-03Fix readme typo.Jason A. Donenfeld1-1/+1 2012-09-03Show program name properly in error message.Jason A. Donenfeld1-1/+1 2012-09-03Move examples into manpage.Jason A. Donenfeld4-93/+224 2012-09-03Make into a real project.Jason A. Donenfeld8-5/+173 2012-09-03Support pass gitJason A. Donenfeld2-1/+15 2012-08-31Add remove synonyms.Jason A. Donenfeld1-2/+2 2012-08-31Use basename in usage.Jason A. Donenfeld1-2/+1 2012-08-19now using gpg_id as a varMatthew Ramirez1-2/+2 2012-08-07Forty five seconds.Jason A. Donenfeld1-1/+1 2012-08-06Deal with klipper and new lines.Jason A. Donenfeld1-3/+19 2012-08-06Update examples.Jason A. Donenfeld1-7/+7 2012-08-06Update readme.Jason A. Donenfeld1-11/+13 2012-08-06Be slicker and more like git.Jason A. Donenfeld1-114/+173