dotfiles

Cross platform dotfiles for linux, mac and windows
git clone git@getsh.org:dotfiles.git
Log | Files | Refs

pfs (461B)


      1 #!/bin/sh
      2 
      3 # reliable password fuzzy searcher
      4 
      5 : ${PASSWORD_STORE_DIR?"Error var not set"}
      6 cd "${PASSWORD_STORE_DIR}" || exit 1
      7 
      8 export PASSWORD_STORE_KEY=bharatvaj@yahoo.com
      9 PASSTOOL=spm
     10 type ${PASSTOOL} 2>/dev/null || PASSTOOL=pass
     11 
     12 selection="$(find -L . -name '*.gpg' | sed 's/.gpg$//g' | ${FUZZER})"
     13 
     14 test -z "${selection}" || {
     15 	case ${selection} in
     16         *totp/*) pass ${1:-"otp"} "${selection}" ;;
     17         ?*)pass ${1:-"show"} "${selection}" ;;
     18 	esac