Skip to content

Commit

Permalink
try to fix password-only entries
Browse files Browse the repository at this point in the history
  • Loading branch information
carnager committed Aug 17, 2016
1 parent ec6efa6 commit b0406cd
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions rofi-pass
Original file line number Diff line number Diff line change
Expand Up @@ -257,18 +257,20 @@ Run ${default_do} with <span color='$help_color'>Enter</span>. For more help hit
password="${password_temp%%$'\n'*}"
pass_key_value=$(echo "${password_temp}" | awk '$1 ~ /:$/{$1=$1;print}')
declare -A stuff
while read -r LINE; do
_id="${LINE%%: *}"
_val="${LINE#* }"
stuff["${_id}"]=${_val}
done < <(echo "${pass_key_value}")
stuff["pass"]=${password}
if test "${stuff['autotype']+autotype}"
then
:
else
if [[ -n $pass_key_value ]]; then
while read -r LINE; do
_id="${LINE%%: *}"
_val="${LINE#* }"
stuff["${_id}"]=${_val}
done < <(echo "${pass_key_value}")
if test "${stuff['autotype']+autotype}"
then
:
else
stuff["autotype"]="${USERNAME_field} :tab pass"
fi
fi
fi
fi
pass_content="$(for key in "${!stuff[@]}"; do echo "${key}: ${stuff[$key]}"; done)"

Expand Down

0 comments on commit b0406cd

Please sign in to comment.