aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2016-08-05 04:44:06 +0200
committerRasmus Steinke <rasi@xssn.at>2016-08-05 04:44:34 +0200
commitb56170104d9ec42d99e046e8cd9896bac81b7dd6 (patch)
tree66eeb1cf711c961901e4d577417f7877e97966bf
parent5083c181fd034a3d9332869e6e8ead500ad544b8 (diff)
downloadrofi-pass-b56170104d9ec42d99e046e8cd9896bac81b7dd6.tar.gz
Remove leading whitespace from fields, fixes #51
-rwxr-xr-xrofi-pass6
1 files changed, 3 insertions, 3 deletions
diff --git a/rofi-pass b/rofi-pass
index 6c4402c..73bd671 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -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