small pixel drawing of a pufferfish dotfiles

bin/pashmenu

1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/sh -e
#
# posix i think

cd "$PASH_DIR"

# strip .gpg extension & preserve newlines; cut things; sort
passwords=$(find . -type f -name "*.gpg" -exec sh -c 'printf "${0%.gpg}\n"' {} \; |  cut -d '/' -f 2- | sort)

password=$(printf '%s' "$passwords" | dmenu)

[ -n "$password" ] || exit

pash copy "$password"