diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2022-07-10 22:08:19 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2022-07-10 22:08:38 +1200 |
commit | 54a3c2fdfd00e4e2444fcc0759978abe5d4b0c79 (patch) | |
tree | 8bf112a48e42aa00a9eb8b2157e2066a0d030574 | |
parent | Extend expiry on key (diff) | |
download | dotfiles-54a3c2fdfd00e4e2444fcc0759978abe5d4b0c79.tar.gz dotfiles-54a3c2fdfd00e4e2444fcc0759978abe5d4b0c79.zip |
Stop dmenu_pass(1df) if no name selected
-rwxr-xr-x | bin/dmenu_pass.sh | 1 |
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 - \ |