From 7947665654c8926834d2914b84064b7d2eaddd2d Mon Sep 17 00:00:00 2001 From: Ryan Chipman Date: Tue, 23 Feb 2016 20:24:44 -0500 Subject: [PATCH] Fix username field name bug Use the env variable USERNAME_field instead of hardcoded "UserName" when saving new passwords. --- rofi-pass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rofi-pass b/rofi-pass index 10a3f6e..9ccde1f 100755 --- a/rofi-pass +++ b/rofi-pass @@ -398,11 +398,11 @@ insertPass () { cd "${root}" group=$(echo -e "No Group\n---\n$(find -type d -not -iwholename '*.git*' -printf '%d\t%P\n' | sort -r -nk1 | cut -f2-)" | _rofi -dmenu -p "Choose Group > ") if [[ "$group" == "No Group" ]]; then - PASSWORD_STORE_DIR="${root}" pass insert -m -f "${name}" < <(echo -e "${pass}\nUserName: ${user}\n---\n${URL_field}: ${domain}") + PASSWORD_STORE_DIR="${root}" pass insert -m -f "${name}" < <(echo -e "${pass}\n${USERNAME_field}: ${user}\n---\n${URL_field}: ${domain}") elif [[ "$group" == "" ]]; then exit else - PASSWORD_STORE_DIR="${root}" pass insert -m -f "${group}/${name}" < <(echo -e "${pass}\nUserName: ${user}\n---\n${URL_field}: ${domain}") + PASSWORD_STORE_DIR="${root}" pass insert -m -f "${group}/${name}" < <(echo -e "${pass}\nU${USERNAME_field}: ${user}\n---\n${URL_field}: ${domain}") fi exit elif [[ $insertmenu == "1 Name"* ]]; then