From 13b160cc27db97227e833566dce03b4e4d54743c Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Fri, 7 May 2021 12:09:16 -0400 Subject: [PATCH] passmenu: switch to pash --- passmenu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/passmenu b/passmenu index 9978c21..a3bdeec 100755 --- a/passmenu +++ b/passmenu @@ -1,5 +1,5 @@ #!/usr/bin/env sh -# A POSIX compliant reimplementation of passmenu. Derived from: +# A POSIX compliant reimplementation of passmenu for pash. Derived from: # https://git.zx2c4.com/password-store/tree/contrib/dmenu/passmenu typeit=0 @@ -8,7 +8,7 @@ if [ "$1" = "--type" ]; then shift fi -prefix=${PASSWORD_STORE_DIR-~/.password-store} +prefix=${PASH_DIR-~/.local/share/pash} password=$(find "$prefix" -name '*.gpg' | awk -v prefix="$prefix" \ '{len = length(prefix) + 2; print substr($0, len, length($0) - len - 3)}' \ | dmenu "$@") @@ -16,8 +16,8 @@ password=$(find "$prefix" -name '*.gpg' | awk -v prefix="$prefix" \ [ -n "$password" ] || exit if [ $typeit -eq 0 ]; then - pass show -c "$password" 2>/dev/null + pash show yacy/admin | head -n 1 | xclip -sel c else - pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | + pash show "$password" | { IFS= read -r pass; printf %s "$pass"; } | xdotool type --clearmodifiers --file - fi -- 2.39.2