diff options
| author | Peter Aronoff | 2011-12-23 12:14:28 -0500 |
|---|---|---|
| committer | Misty De Meo | 2011-12-24 18:00:55 -0600 |
| commit | ec14c98f3d79ad90731483bfd02b20ab2d05ef7c (patch) | |
| tree | 3dbc2214b860d3b72c2ee0e0c5762d1c503aa4aa /Library/Formula | |
| parent | 0db2bab96b759ad27f6ca4beaa0b5b0e39754b05 (diff) | |
| download | homebrew-ec14c98f3d79ad90731483bfd02b20ab2d05ef7c.tar.bz2 | |
Add option for advanced readline support in Lua
Lua can be patched to provide better readline support.[1] On OSX the patch
will use libedit.
I am new to Lua, so I can't say how popular this patch is, but it builds
cleanly and easily with Homebrew, and I'm already finding that it makes
Lua's REPL much more friendly.
[1] See http://lua-users.org/wiki/LuaPowerPatches, under 'Advanced readline
support'.
Closes #9255.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/lua.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Library/Formula/lua.rb b/Library/Formula/lua.rb index 75e2a3818..0c7706656 100644 --- a/Library/Formula/lua.rb +++ b/Library/Formula/lua.rb @@ -14,9 +14,18 @@ class Lua < Formula # Be sure to build a dylib, or else runtime modules will pull in another static copy of liblua = crashy # See: https://github.com/mxcl/homebrew/pull/5043 def patches - DATA + # completion provided by advanced readline power patch from + # http://lua-users.org/wiki/LuaPowerPatches + if ARGV.include? '--completion' + [DATA, 'http://luajit.org/patches/lua-5.1.4-advanced_readline.patch'] + else + DATA + end end + def options + [['--completion', 'Enables advanced readline support']] + end def install # Apply patch-level 2 |
