From d67fee9a0bb6f907533d5d3c7e573c34cdb21bef Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Mon, 16 Mar 2020 10:57:20 +0100 Subject: Update ipass script --- .local/bin/ipass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.local') diff --git a/.local/bin/ipass b/.local/bin/ipass index 63ec46a..deef05f 100755 --- a/.local/bin/ipass +++ b/.local/bin/ipass @@ -2,18 +2,18 @@ main() { - cd "${HOME}/.password-store" || exit 1 + cd -- "$HOME/.password-store" || exit 1 file=$(find ./* -type f | sed 's-^\./--' | sed 's-\.gpg$--' | dmenu) dmenu_exit=$? - if [ "${dmenu_exit}" -ne 0 ] + if [ "$dmenu_exit" -ne 0 ] then exit 2 fi - pass show "$file" | perl -pe 'chomp' | xdotool type --file - - notify-send -i "dialog-password" "ipass" "${file}" + pass show "$file" | head -n 1 | perl -pe 'chomp' | xdotool type --file - + notify-send -i "dialog-password" "ipass" "$file" } main "$@" -- cgit v1.1