Created
November 1, 2013 07:52
-
-
Save pyr/7262127 to your computer and use it in GitHub Desktop.
upon popular request, my pw* tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pwgrep() { | |
gpg --batch -q -d -r [email protected] $HOME/.auth/pwdb.asc | grep $* | |
} | |
function pwcat() { | |
gpg --batch -q -d -r [email protected] $HOME/.auth/pwdb.asc | |
} | |
function pwedit() { | |
[ -z $EDITOR ] && EDITOR=vi | |
file=`mktemp /tmp/pwedit.XXXXXX` | |
gpg -q -d --batch -r [email protected] $HOME/.auth/pwdb.asc > $file && \ | |
$EDITOR $file && \ | |
gpg -q --batch -a -e -r [email protected] $file && \ | |
mv ${file}.asc $HOME/.auth/pwdb.asc | |
rm -f $file ${file}.asc | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment