Skip to content

Instantly share code, notes, and snippets.

@mhluska
Last active December 17, 2015 18:18
Show Gist options
  • Save mhluska/5651782 to your computer and use it in GitHub Desktop.
Save mhluska/5651782 to your computer and use it in GitHub Desktop.
Bash wrapper that makes `pwsafe` easier to work with. Add it to your `.bash_aliases` file.
function pass {
# If no arguments are passed we just call `pwsafe`. This is useful when we
# want to list all available passwords by typing `pass`.
if [ "${#}" -lt 1 ]; then
pwsafe
return
fi
pwsafe -qp ${*} | perl -ne 'chomp and print' | xclip -sel clip
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment