summaryrefslogtreecommitdiffstats
path: root/.bin/get-pass
diff options
context:
space:
mode:
Diffstat (limited to '.bin/get-pass')
-rwxr-xr-x.bin/get-pass11
1 files changed, 11 insertions, 0 deletions
diff --git a/.bin/get-pass b/.bin/get-pass
new file mode 100755
index 0000000..4cdeafd
--- /dev/null
+++ b/.bin/get-pass
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+[ ${#} -ne 0 ]
+
+password_file=$(gopass ls --flat | grep "${@}" | head -n 1)
+[ "${password_file}" ]
+
+echo "+ password: ${password_file}" >&2
+exec gopass show -o "${password_file}"
remember that computers suck.