[download]

local/bin/pass-menu

   1 #!/bin/bash
   2 
   3 cd ${PASSWORD_STORE_DIR:-~/.password-store} || exit
   4 
   5 pass=$(find * -type f | sed 's/\.gpg//' | menu -i pass) || exit
   6 line=$(pass $pass | awk -F : '/./ { print NR ". " (NR == 1 ? "password" : $1) }' | menu -i pass -p $pass) || exit
   7 
   8 _pass(){ printf 'Copied %s@%s to clipboard.\nWill clear in 45 seconds\n' "$2" "$1"; }
   9 export -f _pass
  10 
  11 pass -c${line%.*} $pass && notify _pass $pass ${line#*. }