diff options
author | Rasmus Steinke <rasi@xssn.at> | 2016-08-05 04:44:06 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2016-08-05 04:44:34 +0200 |
commit | b56170104d9ec42d99e046e8cd9896bac81b7dd6 (patch) | |
tree | 66eeb1cf711c961901e4d577417f7877e97966bf | |
parent | 5083c181fd034a3d9332869e6e8ead500ad544b8 (diff) | |
download | rofi-pass-b56170104d9ec42d99e046e8cd9896bac81b7dd6.tar.gz |
Remove leading whitespace from fields, fixes #51
-rwxr-xr-x | rofi-pass | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -256,7 +256,7 @@ Type field of entry with <span color='$help_color'>Enter</span>. For more help h # generate Array of fields password_temp=$(PASSWORD_STORE_DIR="${root}" pass "$selected_password") password="${password_temp%%$'\n'*}" - pass_key_value=$(echo "${password_temp}" | tail -n+2 | grep ': ') + pass_key_value=$(echo "${password_temp}" | awk '$2{ print $1, $2 }') declare -A stuff while read -r LINE; do _id="${LINE%%: *}" @@ -268,7 +268,7 @@ Type field of entry with <span color='$help_color'>Enter</span>. For more help h then : else - stuff["autotype"]="user :tab pass" + stuff["autotype"]="${USERNAME_field} :tab pass" fi fi pass_content="$(for key in "${!stuff[@]}"; do echo "${key}: ${stuff[$key]}"; done)" @@ -399,7 +399,7 @@ showEntry () { then : else - stuff["autotype"]="user :tab pass" + stuff["autotype"]="${USERNAME_field} :tab pass" fi pass_content="$(for key in "${!stuff[@]}"; do echo "${key}: ${stuff[$key]}"; done)" fi |