summaryrefslogtreecommitdiff
path: root/tessen
diff options
context:
space:
mode:
Diffstat (limited to 'tessen')
-rwxr-xr-xtessen8
1 files changed, 6 insertions, 2 deletions
diff --git a/tessen b/tessen
index a22dfb1..8926e39 100755
--- a/tessen
+++ b/tessen
@@ -10,7 +10,7 @@ set +x
# GLOBAL VARIABLES
# variables which won't be changed and can be made readonly
-readonly tsn_version="1.2.1"
+readonly tsn_version="1.2.2"
readonly tsn_prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
readonly tsn_cliptime="${PASSWORD_STORE_CLIP_TIME:-15}"
readonly tsn_delay="${TESSEN_DELAY:-200}"
@@ -54,7 +54,11 @@ get_pass_data() {
local -a passdata
local keyval_regex otp_regex idx key val
- mapfile -t passdata < <(pass "$tsn_passfile")
+ mapfile -t passdata < <(pass "$tsn_passfile" 2> /dev/null)
+ if [[ "${#passdata[@]}" -eq 0 ]]; then
+ _die "$tsn_passfile is empty"
+ fi
+
# the key can contain
# alphanumerics, spaces, hyphen, underscore, plus, at, and hash
# the value can contain