all repos — pw @ 1f8f54198a72a8b76c61e0d80db78ed7014747a5

minimal password store

Use PW_LEN to override default pw length

Signed-off-by: Anirudh Oppiliappan <x@icyphox.sh>
Anirudh Oppiliappan x@icyphox.sh
Mon, 18 Nov 2019 10:22:22 +0530
commit

1f8f54198a72a8b76c61e0d80db78ed7014747a5

parent

a5e5d403482e8fccf7d1f1502bbf1d72962be9d2

2 files changed, 5 insertions(+), 2 deletions(-)

jump to
M pwpw

@@ -22,7 +22,8 @@

if [[ "$#" -eq 2 ]]; then pass="$2" else - pass="$(pwgen 25 1 -s)" + # uses default length of 25 chars, unless PW_LEN is set + pass="$(pwgen ${PW_LEN:-25} 1 -s)" echo "pw: generated password for $1" fi if [[ ! -f "$PW_DIR/$1.gpg" ]]; then

@@ -80,6 +81,7 @@ -d Delete password.

-h Display this help message and exit. Requires PW_KEY to be set. Optionally, set PW_DIR for custom directory location. +Set PW_LEN to an integer of your choice, to override the default password length of 25. " echo "$usage"
M readme.mdreadme.md

@@ -18,7 +18,8 @@ ```

This is your GPG key's associated email ID. Optionally, you may set `PW_DIR` to your desired path to change the -default password store location, which is `~/.pw`. +default password store location, which is `~/.pw`. To override the +default password length of 25, set `PW_LEN` to a number of your choice. ``` pw - mnml password manager