diff options
author | Patrick Spek <p.spek@tyil.nl> | 2020-03-16 10:57:20 +0100 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2021-08-14 11:59:33 +0200 |
commit | d67fee9a0bb6f907533d5d3c7e573c34cdb21bef (patch) | |
tree | a168ee3012b5fa99ea8457389f7fe459f39967e8 /.local | |
parent | b6af19259ffb8deefa251ddbf8043c1a8056f645 (diff) |
Update ipass script
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/ipass | 8 |
1 files changed, 4 insertions, 4 deletions
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 "$@" |