Package: password-store / 1.7.3-2

editor.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From 1a26026db3b74db0245ff12a62a4e4e0c915f61c Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@debian.org>
Date: Sat, 4 Jan 2014 14:29:57 +0000
Subject: Use editor(1) rather than vi(1) if EDITOR is unset

Bug-Debian: http://bugs.debian.org/722254
Forwarded: not-needed
Last-Update: 2014-07-03

Patch-Name: editor.patch
---
 man/pass.1            | 2 +-
 src/password-store.sh | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/man/pass.1 b/man/pass.1
index 01a3fbe..4041e68 100644
--- a/man/pass.1
+++ b/man/pass.1
@@ -116,7 +116,7 @@ command is alternatively named \fBadd\fP.
 \fBedit\fP \fIpass-name\fP
 Insert a new password or edit an existing password using the default text editor specified
 by the environment variable \fIEDITOR\fP or using
-.BR vi (1)
+.BR editor (1)
 as a fallback. This mode makes use of temporary files for editing, but care is taken to
 ensure that temporary files are created in \fI/dev/shm\fP in order to avoid writing to
 difficult-to-erase disk sectors. If \fI/dev/shm\fP is not accessible, fallback to
diff --git a/src/password-store.sh b/src/password-store.sh
index 7264ffc..8af2c74 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -274,7 +274,7 @@ cmd_usage() {
 	        during entry. Or, optionally, the entry may be multiline. Prompt before
 	        overwriting existing password unless forced.
 	    $PROGRAM edit pass-name
-	        Insert a new password or edit an existing password using ${EDITOR:-vi}.
+	        Insert a new password or edit an existing password using ${EDITOR:-editor}.
 	    $PROGRAM generate [--no-symbols,-n] [--clip,-c] [--in-place,-i | --force,-f] pass-name [pass-length]
 	        Generate a new password of pass-length (or $GENERATED_LENGTH if unspecified) with optionally no symbols.
 	        Optionally put it on the clipboard and clear board after $CLIP_TIME seconds.
@@ -480,13 +480,13 @@ cmd_edit() {
 		$GPG -d -o "$tmp_file" "${GPG_OPTS[@]}" "$passfile" || exit 1
 		action="Edit"
 	fi
-	${EDITOR:-vi} "$tmp_file"
+	${EDITOR:-editor} "$tmp_file"
 	[[ -f $tmp_file ]] || die "New password not saved."
 	$GPG -d -o - "${GPG_OPTS[@]}" "$passfile" 2>/dev/null | diff - "$tmp_file" &>/dev/null && die "Password unchanged."
 	while ! $GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile" "${GPG_OPTS[@]}" "$tmp_file"; do
 		yesno "GPG encryption failed. Would you like to try again?"
 	done
-	git_add_file "$passfile" "$action password for $path using ${EDITOR:-vi}."
+	git_add_file "$passfile" "$action password for $path using ${EDITOR:-editor}."
 }
 
 cmd_generate() {