diff options
author | Moviuro <moviuro+git@gmail.com> | 2017-12-05 20:12:28 +0100 |
---|---|---|
committer | Moviuro <moviuro+git@gmail.com> | 2017-12-05 20:12:28 +0100 |
commit | c7d4c16b0dca2c611a9951fd462529f650d99885 (patch) | |
tree | c3b22345be0c9649f34fe27c67c1ddc81da20efb | |
parent | 826683903393ea98209668ac920cb4365586ccb5 (diff) | |
download | rofi-pass-c7d4c16b0dca2c611a9951fd462529f650d99885.tar.gz |
rofi-pass: we don't show otp_method among the fields that we can type
-rwxr-xr-x | rofi-pass | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 |