Add option to suppress password output. Update README to mention this feature and Alternative projects.

This commit is contained in:
drduh 2015-08-04 22:48:09 -04:00
parent 866bbff0eb
commit f42437388d
2 changed files with 13 additions and 5 deletions

View File

@ -20,13 +20,13 @@ Type `r` to read a password(s).
Type `d` to delete a password.
Options can also be passed on the command line, e.g.,
Options can also be passed on the command line. Here are some examples:
`./pwd.sh w gmail 30` to generate and write a password called 'gmail' with a length of 30 characters, or
`./pwd.sh w gmail 30` to create a password for 'gmail' with a length of 30 characters. Append `<space>q` to suppress password output.
`./pwd.sh r github` to read the password called 'github', or
`./pwd.sh r user@github` to read the password for 'user@github'.
`./pwd.sh d dropbox` to delete the password called 'dropbox'.
`./pwd.sh d dropbox` to delete the password for 'dropbox'.
Combine with other programs by piping output, e.g.,
@ -35,3 +35,8 @@ Combine with other programs by piping output, e.g.,
The script and `pwd.sh.safe` encrypted file can be safely shared between machines over public channels (Google Drive, Dropbox, etc).
A sample `gpg.conf` configuration file is provided for your consideration.
# Alternatives
[Pass: the standard unix password manager](http://www.passwordstore.org/)

5
pwd.sh
View File

@ -164,7 +164,10 @@ create_username () {
userpass=$password
else
userpass=$(gen_pass "$@")
echo "
fi
if [[ -z "${4+x}" || ! "${4}" =~ ^([qQ])$ ]] ; then
echo "
Password: ${userpass}"
fi
}