diff options
author | Clement Farabet <clement.farabet@gmail.com> | 2014-07-07 06:34:18 +0400 |
---|---|---|
committer | Clement Farabet <clement.farabet@gmail.com> | 2014-07-07 06:34:18 +0400 |
commit | 1ac6bdeccfde37c4689611bf67f46616bc0c1794 (patch) | |
tree | 060aac830f755ba62aba9e7b6c20d362078841c7 | |
parent | 607818b4174e6fec532bc582c1fc44cd5ac33010 (diff) |
warning (readline unfound)
-rw-r--r-- | init.lua | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -359,6 +359,9 @@ _LAST = '' -- Readline: local readline_ok,readline = pcall(require,"trepl.readline") +if not readline_ok then + print(col.red('WARNING: ') .. 'could not find/load readline, defaulting to linenoise') +end -- REPL: function repl_readline() @@ -528,14 +531,19 @@ end -- No readline -> LineNoise? local nextline if not readline_ok then + print('ici') -- Load linenoise: local ok,L = pcall(require,'linenoise') + ok = false if not ok then -- No readline, no linenoise... default to plain io: nextline = function() io.write(prompt()) io.flush() return io.read('*line') end + + -- Really poor: + print(col.red('WARNING: ') .. 'could not find/load linenoise, defaulting to raw repl') else -- History: local history = os.getenv('HOME') .. '/.luahistory' |