#!/bin/sh

folder="$(ls ~/.password-store/ | sed -e 's/\.gpg$//' | fuzzel -d)"

if [ -z "$folder" ];
then
    exit
fi

choice="$(ls ~/.password-store/$folder | sed -e 's/\.gpg$//' | fuzzel -d)"

if [ -z "$choice" ];
then
    exit
fi

wtype -d 10 "$(pass show "$folder/$choice" | head -n1)"
