aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoviuro <moviuro+git@gmail.com>2017-12-05 20:12:28 +0100
committerMoviuro <moviuro+git@gmail.com>2017-12-05 20:12:28 +0100
commitc7d4c16b0dca2c611a9951fd462529f650d99885 (patch)
treec3b22345be0c9649f34fe27c67c1ddc81da20efb
parent826683903393ea98209668ac920cb4365586ccb5 (diff)
downloadrofi-pass-c7d4c16b0dca2c611a9951fd462529f650d99885.tar.gz
rofi-pass: we don't show otp_method among the fields that we can type
-rwxr-xr-xrofi-pass8
1 files changed, 7 insertions, 1 deletions
diff --git a/rofi-pass b/rofi-pass
index 36e8ba3..96e043b 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -348,17 +348,23 @@ mainMenu () {
stuff["pass"]=${password}
if [[ -n $fields ]]; then
while read -r LINE; do
+ unset _id _val
case "$LINE" in
"otpauth://"*)
_id="OTP"
_val=""
;;
+ "${OTPmethod_field}"*)
+ # We don't show otp_method as a field that we can type
+ ;;
*)
_id="${LINE%%: *}"
_val="${LINE#* }"
;;
esac
- stuff["${_id}"]=${_val}
+ if [[ -n "$_id" ]]; then
+ stuff["${_id}"]=${_val}
+ fi
done < <(printf '%s\n' "${fields}")
if test "${stuff['autotype']+autotype}"
then