diff options
| author | Charlie Sharpsteen | 2011-05-02 12:03:02 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2011-05-03 11:55:58 -0700 |
| commit | 8678c0c27678fc7f3f030dcdac0bc1333733aff0 (patch) | |
| tree | e8b8479cc68f2093745370dff7b00c53f74b5f17 | |
| parent | 3a77bf28c09798b58897b3c6b45af3ba5be5cad2 (diff) | |
| download | homebrew-8678c0c27678fc7f3f030dcdac0bc1333733aff0.tar.bz2 | |
Add bash completion to R
This is the same completion script that Debian includes in the r-base-core
package.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/r.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Formula/r.rb b/Library/Formula/r.rb index b035c83b6..fcdbc3f33 100644 --- a/Library/Formula/r.rb +++ b/Library/Formula/r.rb @@ -4,6 +4,13 @@ def valgrind? ARGV.include? '--with-valgrind' end +class RBashCompletion < Formula + # This is the same script that Debian packages use. + url 'http://rcompletion.googlecode.com/svn-history/r12/trunk/bash_completion/R', :using => :curl + version 'r12' + md5 '3c8f6cf1c07e052074ee843be00fa5d6' +end + class R < Formula url 'http://cran.r-project.org/src/base/R-2/R-2.13.0.tar.gz' homepage 'http://www.R-project.org/' @@ -50,6 +57,10 @@ class R < Formula ln_s prefix+"R.framework/Resources/bin/Rscript", bin ln_s prefix+"R.framework/Resources/man1/R.1", man1 ln_s prefix+"R.framework/Resources/man1/Rscript.1", man1 + + bash_dir = prefix + 'etc/bash_completion.d' + bash_dir.mkpath + RBashCompletion.new.brew { bash_dir.install 'R' } end def caveats; <<-EOS.undent |
