What about:
diff --git a/src/password-store.sh b/src/password-store.sh
index d89d455..4a05c7f 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -474,7 +474,9 @@ cmd_edit() {
set_git "$passfile"
tmpdir #Defines $SECURE_TMPDIR
- local tmp_file="$(mktemp -u "$SECURE_TMPDIR/XXXXXX")-${path//\//-}.txt"
+ local extension
+ [[ $path == *.* ]] || extension=".txt"
+ local tmp_file="$(mktemp -u
"$SECURE_TMPDIR/XXXXXX")-${path//\//-}${extension}"
local action="Add"
if [[ -f $passfile ]]; then
Would that meet the requirements?
_______________________________________________
Password-Store mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/password-store