aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-02-21 01:59:27 +0100
committerTeddy Wing2018-02-21 01:59:27 +0100
commit8cbaddd97590f2aec8dd85d3fb0b4d06d4dd65ac (patch)
treecb735e365605fa78a574362d23dee53b5865d399
parentada8c053bd731c7b017136ecedb08f3480d5ca74 (diff)
downloadgit-branch-list-8cbaddd97590f2aec8dd85d3fb0b4d06d4dd65ac.tar.bz2
Add Homebrew formula
Make it easier to install the program using Homebrew.
-rw-r--r--Homebrew/git-branch-list.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/Homebrew/git-branch-list.rb b/Homebrew/git-branch-list.rb
new file mode 100644
index 0000000..e7f8a93
--- /dev/null
+++ b/Homebrew/git-branch-list.rb
@@ -0,0 +1,23 @@
+class GitBranchList < Formula
+ desc "Maintains a list of Git branches that can be checked out quickly"
+ homepage "https://github.com/teddywing/git-branch-list"
+ url "https://github.com/teddywing/git-branch-list/archive/v0.0.1.tar.gz"
+ sha256 "2bd298e432b09ac8048712c3d47a04a6853ae1eb2287f0f15011e46a3a965a57"
+
+ def install
+ bin.install "git-branch-list"
+ bash_completion.install "git-branch-list.bash-completion" => "git-branch-list"
+ end
+
+ def caveats; <<~EOS
+ To enable tab completion, add the following to your bash profile:
+
+ source #{etc}/bash_completion.d/git-branch-list
+ EOS
+ end
+
+ test do
+ assert_equal "nl: .git/info/git-branch-list: No such file or directory",
+ shell_output("git branch-list 2>&1", 1).strip
+ end
+end