1 2 3 4 5 6 7 8 9 10 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}"