aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/ipass
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2020-03-16 10:57:20 +0100
committerPatrick Spek <p.spek@tyil.nl>2021-08-14 11:59:33 +0200
commitd67fee9a0bb6f907533d5d3c7e573c34cdb21bef (patch)
treea168ee3012b5fa99ea8457389f7fe459f39967e8 /.local/bin/ipass
parentb6af19259ffb8deefa251ddbf8043c1a8056f645 (diff)
Update ipass script
Diffstat (limited to '.local/bin/ipass')
-rwxr-xr-x.local/bin/ipass8
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 "$@"