aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2022-07-10 22:08:19 +1200
committerTom Ryder <tom@sanctum.geek.nz>2022-07-10 22:08:38 +1200
commit54a3c2fdfd00e4e2444fcc0759978abe5d4b0c79 (patch)
tree8bf112a48e42aa00a9eb8b2157e2066a0d030574
parentExtend expiry on key (diff)
downloaddotfiles-54a3c2fdfd00e4e2444fcc0759978abe5d4b0c79.tar.gz
dotfiles-54a3c2fdfd00e4e2444fcc0759978abe5d4b0c79.zip
Stop dmenu_pass(1df) if no name selected
-rwxr-xr-xbin/dmenu_pass.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/dmenu_pass.sh b/bin/dmenu_pass.sh
index 44296439..2969cd16 100755
--- a/bin/dmenu_pass.sh
+++ b/bin/dmenu_pass.sh
@@ -8,6 +8,7 @@ name=$(
LC_ALL=C sort -f |
dmenu
)
+[ -n "$name" ] || exit
password=$(pass show -- "$name" | head -n 1) || exit
[ -n "$password" ] || exit
printf %s "$password" | xdotool type --clearmodifiers --file - \