aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2016-09-10 17:19:45 +0200
committerRasmus Steinke <rasi@xssn.at>2016-09-10 17:19:45 +0200
commit41d0dbf8cae7e713687e3fcdcb2c769f27934a26 (patch)
treee5e8de4e7d0817cec658f1299278882da5810889
parente39d291370c0f1f80699b9cdbc383cebb6ace5d0 (diff)
downloadrofi-pass-41d0dbf8cae7e713687e3fcdcb2c769f27934a26.tar.gz
exclude first line when generating array
-rwxr-xr-xrofi-pass3
1 files changed, 2 insertions, 1 deletions
diff --git a/rofi-pass b/rofi-pass
index 8421f46..476732d 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -252,7 +252,8 @@ Run ${default_do} with <span color='$help_color'>Enter</span>. For more help hit
# generate Array of fields
password_temp=$(PASSWORD_STORE_DIR="${root}" pass "$selected_password")
password="${password_temp%%$'\n'*}"
- pass_key_value=$(echo "${password_temp}" | awk '$1 ~ /:$/{$1=$1;print}')
+ fields="$(echo "${password_temp}" | tail -n +2)"
+ pass_key_value=$(echo "${fields}" | awk '$1 ~ /:$/{$1=$1;print}')
declare -A stuff
stuff["pass"]=${password}
if [[ -n $pass_key_value ]]; then