diff options
author | Rob Hoelz <rob@hoelz.ro> | 2012-06-25 23:16:39 +0200 |
---|---|---|
committer | Rob Hoelz <rob@hoelz.ro> | 2012-06-25 23:16:39 +0200 |
commit | a6e9ded55fd2852168976ed4e2010e9a38726a74 (patch) | |
tree | a87be246a80ee65481c24c7d275c7569c1409984 /README.md | |
download | lua-term-a6e9ded55fd2852168976ed4e2010e9a38726a74.tar.gz lua-term-a6e9ded55fd2852168976ed4e2010e9a38726a74.tar.bz2 lua-term-a6e9ded55fd2852168976ed4e2010e9a38726a74.zip |
Import of first release of lua-term
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..9b67a96 --- /dev/null +++ b/README.md | |||
@@ -0,0 +1,23 @@ | |||
1 | Overview | ||
2 | -------- | ||
3 | |||
4 | lua-term is a Lua module for manipulating a terminal. | ||
5 | |||
6 | Installation | ||
7 | ------------ | ||
8 | |||
9 | lua-term is available on Luarocks. | ||
10 | |||
11 | Usage | ||
12 | ----- | ||
13 | |||
14 | ```lua | ||
15 | local term = require 'term' | ||
16 | local colors = term.colors -- or require 'term.colors' | ||
17 | |||
18 | print(term.isatty(io.stdout)) -- true if standard output goes to the terminal | ||
19 | |||
20 | print(color.red 'hello') | ||
21 | print(color.red .. 'hello' .. color.reset) | ||
22 | print(color.red, 'hello', color.reset) | ||
23 | ``` | ||