about summary refs log tree commit diff
path: root/pkgs/aszlig/gopass/use-color-in-pager.patch
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-04-29 17:53:51 +0200
committeraszlig <aszlig@nix.build>2018-04-29 17:53:51 +0200
commitef40b62e0739b6c4b49916595056f1b4d2d9d078 (patch)
tree540cc8a35aca9817e9eed1f67066d7d000ba7735 /pkgs/aszlig/gopass/use-color-in-pager.patch
parenta714720c38e17fd2d1adb647e0547ef5ea185517 (diff)
pkgs/aszlig: Add gopass with custom patches
I only want gopass to use ASCII symbols. This is something I already
hated in pass, but I never changed it. By switching to gopass now, it's
a great opportunity to change it.

Second, I use "less -R" as a pager, which supports color so there really
is no need to disable colors before piping it to my pager.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/aszlig/gopass/use-color-in-pager.patch')
-rw-r--r--pkgs/aszlig/gopass/use-color-in-pager.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/aszlig/gopass/use-color-in-pager.patch b/pkgs/aszlig/gopass/use-color-in-pager.patch
new file mode 100644
index 00000000..52ea8801
--- /dev/null
+++ b/pkgs/aszlig/gopass/use-color-in-pager.patch
@@ -0,0 +1,20 @@
+diff --git a/action/list.go b/action/list.go
+index c5d2ae0..715ce65 100644
+--- a/action/list.go
++++ b/action/list.go
+@@ -9,7 +9,6 @@ import (
+ 	"os/exec"
+ 	"strings"
+ 
+-	"github.com/fatih/color"
+ 	"github.com/justwatchcom/gopass/utils/ctxutil"
+ 	"github.com/justwatchcom/gopass/utils/out"
+ 	"github.com/justwatchcom/gopass/utils/termutil"
+@@ -84,7 +83,6 @@ func redirectPager(ctx context.Context, subtree tree.Tree) (io.Writer, *bytes.Bu
+ 	if subtree == nil || subtree.Len() < rows {
+ 		return stdout, nil
+ 	}
+-	color.NoColor = true
+ 	buf := &bytes.Buffer{}
+ 	return buf, buf
+ }