mirror of
https://github.com/octoleo/Purse.git
synced 2024-12-29 12:32:39 +00:00
Indent by 2 spaces throughout. Add example for copying password to clipboard on OS X.
This commit is contained in:
parent
62ce715108
commit
866bbff0eb
@ -28,6 +28,10 @@ Options can also be passed on the command line, e.g.,
|
||||
|
||||
`./pwd.sh d dropbox` to delete the password called 'dropbox'.
|
||||
|
||||
Combine with other programs by piping output, e.g.,
|
||||
|
||||
`./pwd.sh r github | grep github | cut -f1 -d ' ' | pbcopy` to copy a password to clipboard on OS X.
|
||||
|
||||
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.
|
||||
|
2
pwd.sh
2
pwd.sh
@ -23,6 +23,7 @@ get_pass () {
|
||||
|
||||
password=''
|
||||
prompt="${1}"
|
||||
|
||||
while IFS= read -p "${prompt}" -r -s -n 1 char ; do
|
||||
if [[ ${char} == $'\0' ]] ; then
|
||||
break
|
||||
@ -57,7 +58,6 @@ decrypt () {
|
||||
encrypt () {
|
||||
# Encrypt with a password.
|
||||
|
||||
|
||||
${gpg} \
|
||||
--symmetric --armor --batch --yes \
|
||||
--passphrase-fd 3 \
|
||||
|
Loading…
Reference in New Issue
Block a user