File: 0001-default-editor.diff

package info (click to toggle)
hut 0.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,088 kB
  • sloc: makefile: 60; sh: 14
file content (29 lines) | stat: -rw-r--r-- 749 bytes parent folder | 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
Description: Default to alternatives when $EDITOR or $PAGER is not set
Author: Taavi Väänänen <taavi@debian.org>
Origin: vendor
Bug-Debian: https://bugs.debian.org/1039891
Forwarded: not-needed
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/main.go
+++ b/main.go
@@ -149,7 +148,7 @@
 func getInputWithEditor(pattern, initialText string) (string, error) {
 	editor := os.Getenv("EDITOR")
 	if editor == "" {
-		return "", errors.New("EDITOR not set")
+		editor = "/usr/bin/editor"
 	}
 
 	commandSplit, err := shlex.Split(editor)
--- a/pager.go
+++ b/pager.go
@@ -26,7 +26,7 @@
 
 	name, ok := os.LookupEnv("PAGER")
 	if !ok {
-		name = "less"
+		name = "/usr/bin/pager"
 	}
 
 	commandSplit, err := shlex.Split(name)