From f2705a7af29817b17b723555c24c8a0b4a3fcac8 Mon Sep 17 00:00:00 2001 From: Vladimir Serov Date: Mon, 5 Apr 2021 01:06:32 +0300 Subject: [PATCH] using _pwgen to regenerate exisiting passwords --- rofi-pass | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/rofi-pass b/rofi-pass index 08d13fb..28d6d37 100755 --- a/rofi-pass +++ b/rofi-pass @@ -332,11 +332,9 @@ generatePass () { if [[ $length_exit -eq 1 ]]; then exit fi - if [[ $length == "" ]]; then - PASSWORD_STORE_DIR="${root}" pass generate ${symbols} -i "$selected_password" "${password_length}" > /dev/null; - else - PASSWORD_STORE_DIR="${root}" pass generate ${symbols} -i "$selected_password" "${length}" > /dev/null; - fi + + pw=$(_pwgen ${password_length:?length}) + { echo $pw; pass $selected_password; } | sed -s 2d | PASSWORD_STORE_DIR="${root}" pass insert -fm $selected_password > /dev/null } # main Menu