vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 869ec48ee5f9946d4188ae0b91c7135c87bb8aba parent 6a7149346a9e7cfe7d2cfe045897f0a9b65f8453 Author: Marc André Tanner <mat@brain-dump.org> Date: Sat, 21 May 2016 12:37:33 +0200 vis-lua: add vis.VERSION property It is a string in `git describe` format, as reporte by `vis -v`. Diffstat:
| M | README.md | | | 1 | + |
| M | vis-lua.c | | | 3 | +++ |
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md @@ -577,6 +577,7 @@ simple short lived (configuration) tasks. At this time there exists no API stability guarantees. - `vis` + - `VERSION` version information string in `git describe` format, same as reported by `vis -v` - `MODE_NORMAL`, `MODE_OPERATOR_PENDING`, `MODE_INSERT`, `MODE_REPLACE`, `MODE_VISUAL`, `MODE_VISUAL_LINE` mode constants - `mode` current mode (one of the above constants) - `lexers` LPeg lexer support module diff --git a/vis-lua.c b/vis-lua.c @@ -1198,6 +1198,9 @@ void vis_lua_init(Vis *vis) { luaL_newmetatable(L, "vis"); luaL_setfuncs(L, vis_lua, 0); + lua_pushstring(L, VERSION); + lua_setfield(L, -2, "VERSION"); + static const struct { enum VisMode id; const char *name;