mirror of
https://github.com/iwata/git-now.git
synced 2026-09-10 07:26:29 -04:00
add install option for zsh completion function
This commit is contained in:
parent
496adeb23e
commit
b6c1208eec
|
|
@ -36,6 +36,15 @@ If you're on a Mac and use [homebrew](http://github.com/mxcl/homebrew), it's sim
|
|||
|
||||
$ brew install https://github.com/iwata/git-now/raw/master/git-now.rb
|
||||
|
||||
#### install options
|
||||
* use ``gnu-getopt``
|
||||
|
||||
$ brew install --gnu-getopt https://github.com/iwata/git-now/raw/master/git-now.rb
|
||||
|
||||
* copy zsh completion function to ``fpath``
|
||||
|
||||
$ brew install --zsh-completion https://github.com/iwata/git-now/raw/master/git-now.rb
|
||||
|
||||
### Manual installation
|
||||
If you prefer a manual installation, please use the following instructions:
|
||||
|
||||
|
|
|
|||
12
git-now.rb
12
git-now.rb
|
|
@ -1,8 +1,8 @@
|
|||
require 'formula'
|
||||
|
||||
class GitNow < Formula
|
||||
url 'https://github.com/iwata/git-now.git', :tag => 'v0.1.0.3'
|
||||
version '0.1.0.3'
|
||||
url 'https://github.com/iwata/git-now.git', :tag => 'v0.1.0.4'
|
||||
version '0.1.0.4'
|
||||
head 'https://github.com/iwata/git-now.git', :branch => 'develop'
|
||||
homepage 'https://github.com/iwata/git-now'
|
||||
|
||||
|
|
@ -11,15 +11,19 @@ class GitNow < Formula
|
|||
end
|
||||
|
||||
# for longopt
|
||||
if ARGV.include? '--ln-gnu-getopt'
|
||||
if ARGV.include? '--gnu-getopt'
|
||||
depends_on 'gnu-getopt'
|
||||
end
|
||||
|
||||
def install
|
||||
system "make", "prefix=#{prefix}", "install"
|
||||
if ARGV.include? '--ln-gnu-getopt'
|
||||
if ARGV.include? '--gnu-getopt'
|
||||
system "brew ln gnu-getopt"
|
||||
end
|
||||
if ARGV.include? '--zsh-completion'
|
||||
fpath = `echo $fpath |cut -d ' ' -f 1`
|
||||
system "cp etc/_git-now #{fpath}"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue