From a6e5e3a5335c77e79845afca9a4c8bbbb988d3c5 Mon Sep 17 00:00:00 2001 From: Jesus Lopez Date: Fri, 19 Apr 2013 11:55:19 -0700 Subject: vim: Add --override-system-vi option When specified, `/usr/local/bin/vi` is also symlinked, so that executing `vi` will launch homebrew's version. Closes #19309. Signed-off-by: Adam Vandenberg --- Library/Formula/vim.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Library/Formula') diff --git a/Library/Formula/vim.rb b/Library/Formula/vim.rb index 3d1b8434e..a6f28196d 100644 --- a/Library/Formula/vim.rb +++ b/Library/Formula/vim.rb @@ -16,6 +16,7 @@ class Vim < Formula LANGUAGES = %w(lua mzscheme perl python python3 tcl ruby) DEFAULT_LANGUAGES = %w(ruby python) + option "override-system-vi", "Override system vi" LANGUAGES.each do |language| option "with-#{language}", "Build vim with #{language} support" option "without-#{language}", "Build vim without #{language} support" @@ -60,5 +61,6 @@ class Vim < Formula # statically-linked interpreters like ruby # http://code.google.com/p/vim/issues/detail?id=114&thanks=114&ts=1361483471 system "make", "install", "prefix=#{prefix}", "STRIP=/usr/bin/true" + ln_s bin+'vim', bin+'vi' if build.include? 'override-system-vi' end end -- cgit v1.2.3