From 31f53cde10f504fad17dfef054f227ec86eaba22 Mon Sep 17 00:00:00 2001 From: Jason Petersen Date: Wed, 15 Nov 2017 15:49:01 -0800 Subject: [PATCH] pspg 0.5 (new formula) This adds a new formula for pspg, a pager intended for use by psql which adds features nice to have when viewing relational data. These include freezing columns and rows, consistent display of headers, and colorful themes. Closes #20686. Signed-off-by: FX Coudert --- Formula/pspg.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Formula/pspg.rb diff --git a/Formula/pspg.rb b/Formula/pspg.rb new file mode 100644 index 0000000000..7f46ce360b --- /dev/null +++ b/Formula/pspg.rb @@ -0,0 +1,27 @@ +class Pspg < Formula + desc "Unix pager optimized for psql" + homepage "https://github.com/okbob/pspg" + url "https://github.com/okbob/pspg/archive/0.5.tar.gz" + sha256 "754d1e380d072517e9bc2c3c38785e2f19a9f927f061de9a646fd1094baa204e" + head "https://github.com/okbob/pspg.git" + + depends_on "ncurses" + + def install + system "./configure", "--disable-debug", + "--prefix=#{prefix}" + system "make", "install" + end + + def caveats; <<~EOS + Add the following line to your psql profile (e.g. ~/.psqlrc) + \\setenv PAGER pspg + \\pset border 2 + \\pset linestyle unicode + EOS + end + + test do + assert_match("pspg-#{version}", shell_output("#{bin}/pspg --version").chomp) + end +end