@@ -19,8 +19,13 @@ names.
1919
2020** One thing well.** luaenv is concerned solely with switching Lua
2121 versions. It's simple and predictable. A rich plugin ecosystem lets
22+ <<<<<<< HEAD
2223 you tailor it to suit your needs. Compile your own Lua versions, or
2324 use the [ lua-build] ( https://github.com/cehoffman/lua-build )
25+ =======
26+ you tailor it to suit your needs. Compile your own Lua versions, or
27+ use the [ lua-build] [ ]
28+ >>>>>>> sstephenson/master
2429 plugin to automate the process. Specify per-application environment
2530 variables with [ luaenv-vars] ( https://github.com/cehoffman/luaenv-vars ) .
2631 See more [ plugins on the
@@ -37,8 +42,14 @@ names.
3742 * [ Basic GitHub Checkout] ( #basic-github-checkout )
3843 * [ Upgrading] ( #upgrading )
3944 * [ Homebrew on Mac OS X] ( #homebrew-on-mac-os-x )
45+ <<<<<<< HEAD
4046 * [ Neckbeard Configuration] ( #neckbeard-configuration )
4147 * [ Uninstalling Lua Versions] ( #uninstalling-lua-versions )
48+ =======
49+ * [ How luaenv hooks into your shell] ( #how-luaenv-hooks-into-your-shell )
50+ * [ Installing Lua Versions] ( #installing-lua-versions )
51+ * [ Uninstalling Lua Versions] ( #uninstalling-lua-versions )
52+ >>>>>>> sstephenson/master
4253* [ Command Reference] ( #command-reference )
4354 * [ luaenv local] ( #luaenv-local )
4455 * [ luaenv global] ( #luaenv-global )
@@ -103,13 +114,24 @@ reading it from the following sources, in this order:
103114 the [ ` luaenv shell ` ] ( #luaenv-shell ) command to set this environment
104115 variable in your current shell session.
105116
117+ <<<<<<< HEAD
1061182 . The application-specific ` .lua-version ` file in the current
107119 directory, if present. You can modify the current directory's
108120 ` .lua-version ` file with the [ ` luaenv local ` ] ( #luaenv-local )
109121 command.
110122
1111233 . The first ` .lua-version ` file found by searching each parent
112124 directory until reaching the root of your filesystem, if any.
125+ =======
126+ 2 . The first ` .lua-version ` file found by searching the directory of the
127+ script you are executing and each of its parent directories until reaching
128+ the root of your filesystem.
129+
130+ 3 . The first ` .lua-version ` file found by searching the current working
131+ directory and each of its parent directories until reaching the root of your
132+ filesystem. You can modify the ` .lua-version ` file in the current working
133+ directory with the [ ` luaenv local ` ] ( #luaenv-local ) command.
134+ >>>>>>> sstephenson/master
113135
1141364 . The global ` ~/.luaenv/version ` file. You can modify this file using
115137 the [ ` luaenv global ` ] ( #luaenv-global ) command. If the global version
@@ -144,7 +166,11 @@ easy to fork and contribute any changes back upstream.
1441661 . Check out luaenv into ` ~/.luaenv ` .
145167
146168 ~~~ sh
169+ <<< <<< < HEAD
147170 $ git clone git://github.com/cehoffman/luaenv.git ~ /.luaenv
171+ =======
172+ $ git clone https://github.com/sstephenson/luaenv.git ~ /.luaenv
173+ >>>>>>> sstephenson/master
148174 ~~~
149175
1501762. Add ` ~/.luaenv/bin` to your ` $PATH ` for access to the ` luaenv`
@@ -154,7 +180,7 @@ easy to fork and contribute any changes back upstream.
154180 $ echo ' export PATH="$HOME/.luaenv/bin:$PATH"' >> ~ /.bash_profile
155181 ~~~
156182
157- ** Ubuntu note** : Modify your ` ~/.profile ` instead of ` ~/.bash_profile` .
183+ ** Ubuntu Desktop note** : Modify your ` ~/.bashrc ` instead of ` ~/.bash_profile` .
158184
159185 ** Zsh note** : Modify your ` ~/.zshrc` file instead of ` ~/.bash_profile` .
160186
@@ -164,15 +190,22 @@ easy to fork and contribute any changes back upstream.
164190 $ echo ' eval "$(luaenv init -)"' >> ~ /.bash_profile
165191 ~~~
166192
167- _Same as in previous step, use ` ~/.profile ` on Ubuntu, ` ~/.zshrc` for Zsh._
193+ _Same as in previous step, use ` ~/.bashrc ` on Ubuntu, or ` ~/.zshrc` for Zsh._
168194
195+ <<< <<< < HEAD
1691964. Restart your shell as a login shell so the path changes take effect.
170197 You can now begin using luaenv.
198+ =======
199+ 4. Restart your shell so that PATH changes take effect. (Opening a new
200+ terminal tab will usually do it.) Now check if luaenv was set up:
201+ >>>>>>> sstephenson/master
171202
172203 ~ ~~ sh
173- $ exec $SHELL -l
204+ $ type luaenv
205+ # => "luaenv is a function"
174206 ~ ~~
175207
208+ <<< <<< < HEAD
1762095. Install [lua-build](https://github.com/cehoffman/lua-build),
177210 which provides an ` luaenv install` command that simplifies the
178211 process of installing new Lua versions.
@@ -191,6 +224,11 @@ easy to fork and contribute any changes back upstream.
191224 ~ ~~
192225 $ luaenv rehash
193226 ~ ~~
227+ =======
228+ 5. _(Optional)_ Install [lua-build][], which provides the
229+ ` luaenv install` command that simplifies the process of
230+ [installing new Lua versions](# installing-lua-versions).
231+ >>>>>>> sstephenson/master
194232
195233# ### Upgrading
196234
@@ -210,8 +248,17 @@ $ git fetch
210248$ git checkout v0.3.0
211249~~~
212250
251+ If you' ve [installed via Homebrew](# homebrew-on-mac-os-x), then upgrade
252+ via its ` brew` command:
253+
254+ ~ ~~ sh
255+ $ brew update
256+ $ brew upgrade luaenv lua-build
257+ ~ ~~
258+
213259# ## Homebrew on Mac OS X
214260
261+ <<< <<< < HEAD
215262You can also install luaenv using the
216263[Homebrew](http://mxcl.github.com/homebrew/) package manager on Mac OS
217264X.
@@ -225,10 +272,22 @@ $ brew install lua-build
225272To later update these installs, use ` upgrade` instead of ` install` .
226273
227274Afterwards you' ll still need to add `eval "$(luaenv init -)"` to your
275+ =======
276+ As an alternative to installation via GitHub checkout, you can install
277+ luaenv and [lua-build][] using the [Homebrew](http://brew.sh) package
278+ manager on Mac OS X:
279+
280+ ~~~
281+ $ brew update
282+ $ brew install luaenv lua-build
283+ ~~~
284+
285+ Afterwards you' ll still need to add ` eval " $( luaenv init -) " ` to your
286+ >>>>>>> sstephenson/master
228287profile as stated in the caveats. You' ll only ever have to do this
229288once.
230289
231- ### Neckbeard Configuration
290+ ### How luaenv hooks into your shell
232291
233292Skip this section unless you must know what every line in your shell
234293profile is doing.
@@ -260,7 +319,32 @@ opposed to this idea. Here's what `luaenv init` actually does:
260319Run ` luaenv init -` for yourself to see exactly what happens under the
261320hood.
262321
322+ <<< <<< < HEAD
263323# ## Uninstalling Lua Versions
324+ =======
325+ # ## Installing Lua Versions
326+
327+ The ` luaenv install` command doesn' t ship with luaenv out of the box, but
328+ is provided by the [lua-build][] project. If you installed it either
329+ as part of GitHub checkout process outlined above or via Homebrew, you
330+ should be able to:
331+
332+ ~~~ sh
333+ # list all available versions:
334+ $ luaenv install -l
335+
336+ # install a Lua version:
337+ $ luaenv install 2.0.0-p247
338+ ~~~
339+
340+ Alternatively to the `install` command, you can download and compile
341+ Lua manually as a subdirectory of `~/.luaenv/versions/`. An entry in
342+ that directory can also be a symlink to a Lua version installed
343+ elsewhere on the filesystem. luaenv doesn' t care; it will simply treat
344+ any entry in the ` versions/` directory as a separate Lua version.
345+
346+ # ## Uninstalling Lua Versions
347+ >>>>>>> sstephenson/master
264348
265349As time goes on, Lua versions you install will accumulate in your
266350` ~/.luaenv/versions` directory.
@@ -270,9 +354,14 @@ version you want to remove. You can find the directory of a particular
270354Lua version with the ` luaenv prefix` command, e.g. ` luaenv prefix
271355luajit-2.0.1` .
272356
357+ <<< <<< < HEAD
273358The [lua-build](https://github.com/cehoffman/lua-build) plugin
274359provides an ` luaenv uninstall` command to automate the removal
275360process.
361+ =======
362+ The [lua-build][] plugin provides an ` luaenv uninstall` command to
363+ automate the removal process.
364+ >>>>>>> sstephenson/master
276365
277366# # Command Reference
278367
@@ -382,19 +471,24 @@ The luaenv source code is [hosted on
382471GitHub](https://github.com/cehoffman/luaenv). It' s clean, modular,
383472and easy to understand, even if you' re not a shell hacker.
384473
474+ Tests are executed using [Bats](https://github.com/sstephenson/bats):
475+
476+ $ bats test
477+ $ bats test/< file> .bats
478+
385479Please feel free to submit pull requests and file bugs on the [issue
386480tracker](https://github.com/cehoffman/luaenv/issues).
387481
388482It is also likely any bugs you find exist in the original source from which
389483luaenv has been adapted. Check out
390- [rbenv ](https://github.com/sstephenson/rbenv ) to see if they have a fix that
484+ [luaenv ](https://github.com/sstephenson/luaenv ) to see if they have a fix that
391485should be ported over or need the bug squashed too.
392486
393487# ## Version History
394488
395489** 0.4.0** (March 2, 2013)
396490
397- * Converted rbenv and ruby references to luaenv and lua respectively
491+ * Converted luaenv and lua references to luaenv and lua respectively
398492* Initial public release.
399493
400494# ## License
@@ -421,3 +515,6 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
421515LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
422516OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
423517WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
518+
519+
520+ [lua-build]: https://github.com/sstephenson/lua-build#readme
0 commit comments