From 7ed5787f7e5f807c13ba97b1e83c4695f7a8defd Mon Sep 17 00:00:00 2001 From: Peter Soetens Date: Fri, 9 Nov 2012 23:10:50 +0100 Subject: [PATCH 1/2] doc: fixup omissions from readme file. Signed-off-by: Peter Soetens --- README | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README b/README index cd6f934..99e64f9 100644 --- a/README +++ b/README @@ -18,8 +18,12 @@ SETUP Add the build directory to your LUA_PATH and LUA_CPATH: -$ export LUA_PATH="$LUA_PATH;$HOME/src/git/rttlua-completion/?.lua" -$ export LUA_CPATH="$LUA_CPATH;$HOME/src/git/rttlua-completion/?.so" +$ export LUA_PATH=";;;$HOME/src/git/rttlua-completion/?.lua;$LUA_PATH" +$ export LUA_CPATH=";;;$HOME/src/git/rttlua-completion/?.so;$LUA_CPATH" + +Note that in virtually all cases, you want your LUA_PATH and +LUA_CPATH variables to start with ';;;', which means: search +standard system paths as well. RUNNING @@ -27,15 +31,15 @@ RUNNING either run rttlua as follows: -$ rttlua-gnulinux -lcomplete +$ rttlua-gnulinux -lcomplete -lreadline or put the following line in your ~/.rttlua file require "complete" +require "readline" When you're in the Lua shell, hit tab to get possible completions. - HISTORY SUPPORT --------------- @@ -48,6 +52,15 @@ the 'readline' module: | read_history(filename) | read the history from the given filename | | write_history(filename) | write the current history to a file | +For example, you can put this command snippet +in your ~/.rttlua file: + +if io.open(".rttlua_history") then + io:close() + read_history(".rttlua_history") +end + +There is currently no mechanism to automatically save the history. BUGS ---- -- 1.7.5.4