From 752cfb7067edec304300f56ce4bc7fdb850998d5 Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Mon, 12 Dec 2016 18:23:13 +0100 Subject: [PATCH] allow entries to share passwords by referencing a password file with "#FILE=SOME_FILE" where SOME_FILE is relative to your PASSWORD_STORE_ROOT. --- rofi-pass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rofi-pass b/rofi-pass index a88c6c3..37b9cb4 100755 --- a/rofi-pass +++ b/rofi-pass @@ -256,6 +256,11 @@ Run ${default_do} with Enter. For more help hit # pass_key_value=$(echo "${fields}" | awk '$1 ~ /:$/{$1=$1;print}') mapfile -t password_temp < <(PASSWORD_STORE_DIR="${root}" pass "$selected_password") password=${password_temp[0]} + if [[ ${password} == "#FILE="* ]]; then + pass_file="${password#*=}" + mapfile -t password_temp < <(PASSWORD_STORE_DIR="${root}" pass "${pass_file}") + password=${password_temp[0]} + fi fields=$(printf '%s\n' "${password_temp[@]:1}" | awk '$1 ~ /:$/{$1=$1;print}') declare -A stuff