From c7d2f08ba44243ac1db478a0d5239763932a6861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 21 May 2016 12:37:33 +0200 Subject: vis-lua: add vis.VERSION property It is a string in `git describe` format, as reporte by `vis -v`. --- README.md | 1 + vis-lua.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index a27c982..d8dc1b4 100644 --- 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 index ad017b1..ee474e1 100644 --- 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; -- cgit v1.2.3