aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2018-03-28 21:58:25 +0200
committerRasmus Steinke <rasi@xssn.at>2018-03-28 21:59:00 +0200
commit3ce676fefc94ef8e047a7c039627fdcc9b43b262 (patch)
tree5f5a2423c0cc42c920e95222f4d11bd8de7bab81
parent6ba5dfb2140c1148fdebfae35f45a2a893feb895 (diff)
downloadrofi-pass-3ce676fefc94ef8e047a7c039627fdcc9b43b262.tar.gz
add option to (not) open new password entries in editor, fixes #122
-rw-r--r--config.example6
-rwxr-xr-xrofi-pass6
2 files changed, 10 insertions, 2 deletions
diff --git a/config.example b/config.example
index 24f1f26..bac714a 100644
--- a/config.example
+++ b/config.example
@@ -59,7 +59,11 @@ help_color="#4872FF"
# Possible options: primary, clipboard, both
clip=primary
-# Options for generating new password entries
+## Options for generating new password entries
+
+# open new password entries in editor
+open_new_pass="true"
+
# default_user is also used for password files that have no user field.
#default_user="${ROFI_PASS_DEFAULT_USER-$(whoami)}"
#default_user2=mary_ann
diff --git a/rofi-pass b/rofi-pass
index 76fd419..4ce5bb1 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -732,7 +732,11 @@ Type name, make sure it is unique"
"${pw}"
"---"
"${USERNAME_field}: ${user}")
- printf '%s\n' "${pass_content[@]}" | PASSWORD_STORE_DIR="${root}" pass insert -m "${group}/${name}" > /dev/null && PASSWORD_STORE_DIR="${root}" pass edit "${group}/${name}"
+ printf '%s\n' "${pass_content[@]}" | PASSWORD_STORE_DIR="${root}" pass insert -m "${group}/${name}" > /dev/null
+ if [[ $edit_new_pass == "true" ]]
+ then
+ PASSWORD_STORE_DIR="${root}" pass edit "${group}/${name}"
+ fi
fi
fi
}