mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
17487f9ebe
- This should actually be a merge but we made a mistake on the initial repo creation and a merge was not possible. - Below there is a resumed log of the commit messages for the few steps, just for the record. - The merged commit messages for this work are: - Removing Portuguese doc content - Ignore folder names fixed on .gitignore - Removed doc files which content migrated to the CMS - docdata.lua updated accordingly - Doc build checked ok - Overall doc structure and contents still being refined - Removing folder cache from git versioning - Removing folder dist from git versioning. The folders above are generated by the buildall.lua script and are not part of the sources - Adding .gitignore file with objects info to inform git what to ignore - Removed file - Merge branch 'master' of git@repos.giga.puc-rio.br:elua-doc.git - Moving all files and folders to a working doc folder - Css updated - Index page added and CSS adjusts - Merge branch 'master' of git@repos.giga.puc-rio.br:elua-doc.git - Signed-off-by: Guilherme Sanchez <guilhermesanchezpacheco@gmail.com> - Merge branch 'master' of git@repos.giga.puc-rio.br:elua-doc.git - files deleted - Changed function that creates functions submenus. - Menu inserted with árvore, CSS adjusts, google search - Changed past design to new design - CSS updated - initial import - The commit ids were also preserved but they are related to this "other" work done on Led Lab. We'll keep the repo just in case. 4dce3f77c47b0c3001a2075a946e80ee52759b49 - Removing Portuguese doc content 78d8847525cacf045fe7e672cff6bd1e058a6a4b Ignore folder names fixed on .gitignore 48dee6b7962168ab1098bf709ead6f3cfe6b7964 - Removed doc files which content migrated to the CMS - docdata.lua updated accordingly - Doc build checked ok - Overall doc structure and contents still being refined 2aa2fe0c554db03dbc7029c34d0f4500fe625b37 - Removing folder cache from git versioning - Removing folder dist from git versioning The folders above are generated by the buildall.lua script and are not part of the sources - Adding .gitignore file with objects info to inform git what to ignore af6cc2890edf1855af319dc999a03feee5f9bee0 Removed file 6a180e72eb4f4860620cafc0685000e9f2174cfe Merge branch 'master' of git@repos.giga.puc-rio.br:elua-doc.git eb430112e78ae537459ab315e228ebca84bdf2d4 Moving all files and folders to a working doc folder d28a7c99489915630bd2625f3756fecf0d08ce37 Css updated 32836ffe382f04ab07c3e6f018c7b449a20d7a8d Index page added and CSS adjusts 1461d9957d9d25a1467cb57ab8717aa213a37e8d Merge branch 'master' of git@repos.giga.puc-rio.br:elua-doc.git ae1934c04f35a29e25bb4495ae8a31cd9c000b5b Signed-off-by: Guilherme Sanchez <guilhermesanchezpacheco@gmail.com> b5f31d70f1fac8d3fba325c9867a03f976775698 Merge branch 'master' of git@repos.giga.puc-rio.br:elua-doc.git ec9ad8446b7ea38b252c6a416e70774349835e45 files deleted bd7a80151b2030720ba8d8a303467d8c25a4b4b2 Changed function that creates functions submenus. 6a7494acaec694fadbb13520bcbccc51a6b95dfe Inserido menu com árvore, ajustes no CSS, busca do google e979f1c259d425c9a3be83f9cda20eddffe073bb Changed past design to new design. 381459e95286886b052103a0253e60b29e064d7a CSS updated 4f81d2f1195efe733fe5f97517be325d75937bc3 initial import
47 lines
2.8 KiB
Plaintext
47 lines
2.8 KiB
Plaintext
// $$HEADER$$
|
|
What is linenoise?
|
|
------------------
|
|
Technically speaking, https://github.com/antirez/linenoise[Linenoise] is a small
|
|
replacement library for GNU's http://tiswww.case.edu/php/chet/readline/rltop.html[readline]
|
|
library, which is already supported by standard Lua. What it actually does is
|
|
give you a nice way to edit your Lua commands inside the Lua interpreter
|
|
(by using the arrow keys and other key sequences presented below)
|
|
recall a line that was already entered, and save the history of the lines you
|
|
entered. It's very convenient when prototyping within the Lua interpreter, because
|
|
all the lines entered at the Lua prompt can be saved and turned into a proper
|
|
application by editing the saved file. It also takes the Lua interpreter much
|
|
closer to its desktop counterpart with regards to ease of use.
|
|
|
|
Linenoise in eLua
|
|
-----------------
|
|
Starting with version 0.8, eLua contains a port of the linenoise library. To use it, make sure it is included
|
|
in the build, refer to the link:building.html[build instructions] for details. Note that linenoise requires
|
|
ANSI terminal support (*BUILD_TERM*), so you need to enable that too. To use it, simply start the Lua interpreter.
|
|
The table below contains a list of keys that can be used to take advantage of linenoise:
|
|
|
|
[width="80%", cols="<2,<5", options="header"]
|
|
|=============================================
|
|
^| Key(s) ^| Action
|
|
| Left and right | Move left and right in the current prompt line
|
|
| Up | Recall the previous line
|
|
| Down | Recall the next line
|
|
| CTRL+C | Abandon the current line
|
|
| Home | Go to the beginning of the line
|
|
| End | Go to the end of the line
|
|
| CTRL+K | Delete from the cursor to the end of the line
|
|
| CTRL+U | Delete the current line
|
|
|=============================================
|
|
|
|
To save the history, simply call *elua.save_history* with the name of the file in which the history will be saved
|
|
(check link:refman_gen_elua.html[here] for details). Be careful, the file will be overwritten. +
|
|
The exact same keys presented in the table above can be used by the eLua shell if linenoise is enabled for it.
|
|
However, you won't be able to save history from the eLua shell. +
|
|
The reason why this component isn't enabled by default is that it takes RAM (like all good things in eLua :) ) so
|
|
keep this in mind when deciding if you want it or not.
|
|
|
|
IMPORTANT: linenoise support seems to be dependent on the terminal emulator used with eLua on the PC side. It was tested
|
|
(and works properly) with http://www.ayera.com/teraterm/[TeraTerm] under Windows and with _screen_ in Linux. Other
|
|
terminal emulators might not work equally as well.
|
|
|
|
// $$FOOTER$$
|