Skip to content

Commit 752cfb7

Browse files
committed
allow entries to share passwords by referencing a password file with "#FILE=SOME_FILE" where SOME_FILE is relative to your PASSWORD_STORE_ROOT.
1 parent ee1e651 commit 752cfb7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

rofi-pass

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,11 @@ Run ${default_do} with <span color='$help_color'>Enter</span>. For more help hit
256256
# pass_key_value=$(echo "${fields}" | awk '$1 ~ /:$/{$1=$1;print}')
257257
mapfile -t password_temp < <(PASSWORD_STORE_DIR="${root}" pass "$selected_password")
258258
password=${password_temp[0]}
259+
if [[ ${password} == "#FILE="* ]]; then
260+
pass_file="${password#*=}"
261+
mapfile -t password_temp < <(PASSWORD_STORE_DIR="${root}" pass "${pass_file}")
262+
password=${password_temp[0]}
263+
fi
259264
fields=$(printf '%s\n' "${password_temp[@]:1}" | awk '$1 ~ /:$/{$1=$1;print}')
260265

261266
declare -A stuff

0 commit comments

Comments
 (0)