xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit 4039d9d9aae1ac1a6f44f1d41433dc129da5cfc7

Bump version of Lua API to v0.1.0
Not very useful at the moment, but a nice way to make sure that
reporting and checking for the version works fine and will do so when
version changes start to matter.
Author: xaizek
Author date (UTC): 2023-03-14 22:58
Committer name: xaizek
Committer date (UTC): 2023-03-15 10:16
Parent(s): 400c47d439c9dee29c2aa64fd4e793dd17e2775c
Signing key: 99DC5E4DB05F6BE2
Tree: ec120eb9403ae0acf2290dbc1a15ba48a0d4322c
File Lines added Lines deleted
ChangeLog.LuaAPI 4 1
data/vim/doc/app/vifm-lua.txt 6 4
src/lua/vifm.c 1 1
tests/lua/api.c 12 2
File ChangeLog.LuaAPI changed (mode: 100644) (index a73d42089..466fd81f1)
... ... After that all changes will be documented in the regular ChangeLog.
6 6
7 7 0.12.1 to current 0.12.1 to current
8 8
9 Bumped API version to v0.1.0 due to bug fixes and various additions.
10
9 11 Additions to enabled standard libraries: Additions to enabled standard libraries:
10 12 * os.getenv() * os.getenv()
11 13
 
... ... After that all changes will be documented in the regular ChangeLog.
14 16 * running code before exit and when a file operation is done * running code before exit and when a file operation is done
15 17 * starting background jobs to do something when they're over * starting background jobs to do something when they're over
16 18
17 Changed VifmTab:getview() without arguments to return active pane of gtab.
19 Changed description of VifmTab:getview() without arguments to return
20 active pane of a global tab, which is what it was actually doing.
18 21
19 22 Added vifm.executable() that check for an executable file or command in Added vifm.executable() that check for an executable file or command in
20 23 $PATH. $PATH.
File data/vim/doc/app/vifm-lua.txt changed (mode: 100644) (index 0d9c4f825..523d6f260)
1 *vifm-lua.txt* For Vifm version 1.0 Last change: 2023 Mar 13
1 *vifm-lua.txt* For Vifm version 1.0 Last change: 2023 Mar 15
2 2
3 3 Email for bugs and suggestions: <xaizek@posteo.net> Email for bugs and suggestions: <xaizek@posteo.net>
4 4
5 5 Note: this is very much work in progress. Everything can change up to Note: this is very much work in progress. Everything can change up to
6 6 complete removal of this interface (that's an unlikely scenario though). complete removal of this interface (that's an unlikely scenario though).
7 7
8 Current API version: v0.1.0
9
8 10 |vifm-lua-status| Status of plugins. |vifm-lua-status| Status of plugins.
9 11 |vifm-lua-plugins| Sample plugins. |vifm-lua-plugins| Sample plugins.
10 12 |vifm-lua-lua| Generic reasoning behind this API. |vifm-lua-lua| Generic reasoning behind this API.
 
... ... version.app.str (string) *vifm-l_vifm.version.app.str*
1036 1038 Version of Vifm as a string. Version of Vifm as a string.
1037 1039
1038 1040 version.api.major (integer) *vifm-l_vifm.version.api.major* version.api.major (integer) *vifm-l_vifm.version.api.major*
1039 Major version of Lua API. 0 now, should become 1 when API design settles and
1041 Major version of Lua API. Should become 1 when API design settles and then
1040 1042 remain at 1. remain at 1.
1041 1043
1042 1044 version.api.minor (integer) *vifm-l_vifm.version.api.minor* version.api.minor (integer) *vifm-l_vifm.version.api.minor*
1043 Minor version of Lua API. 0 now.
1045 Minor version of Lua API.
1044 1046
1045 1047 version.api.patch (integer) *vifm-l_vifm.version.api.patch* version.api.patch (integer) *vifm-l_vifm.version.api.patch*
1046 Patch version of Lua API. 0 now.
1048 Patch version of Lua API.
1047 1049
1048 1050 version.api.has({feature}) *vifm-l_vifm.version.api.has()* version.api.has({feature}) *vifm-l_vifm.version.api.has()*
1049 1051 Checks presence of a feature. There are no features to test yet. Checks presence of a feature. There are no features to test yet.
File src/lua/vifm.c changed (mode: 100644) (index 96f4978d0..8f42b75de)
47 47
48 48 /* Lua API version. */ /* Lua API version. */
49 49 #define API_VER_MAJOR 0 #define API_VER_MAJOR 0
50 #define API_VER_MINOR 0
50 #define API_VER_MINOR 1
51 51 #define API_VER_PATCH 0 #define API_VER_PATCH 0
52 52
53 53 /* /*
File tests/lua/api.c changed (mode: 100644) (index cba835ade..317fe7eef)
... ... TEST(vifm_version)
280 280 "print(vifm.version.api.major," "print(vifm.version.api.major,"
281 281 " vifm.version.api.minor," " vifm.version.api.minor,"
282 282 " vifm.version.api.patch)")); " vifm.version.api.patch)"));
283 assert_string_equal("0\t0\t0", ui_sb_last());
283 assert_string_equal("0\t1\t0", ui_sb_last());
284 284
285 285 ui_sb_msg(""); ui_sb_msg("");
286 286 assert_success(vlua_run_string(vlua, assert_success(vlua_run_string(vlua,
 
... ... TEST(vifm_version)
290 290 ui_sb_msg(""); ui_sb_msg("");
291 291 assert_success(vlua_run_string(vlua, assert_success(vlua_run_string(vlua,
292 292 "print(vifm.version.api.atleast(0, 0, 1))")); "print(vifm.version.api.atleast(0, 0, 1))"));
293 assert_string_equal("false", ui_sb_last());
293 assert_string_equal("true", ui_sb_last());
294 294
295 295 ui_sb_msg(""); ui_sb_msg("");
296 296 assert_success(vlua_run_string(vlua, assert_success(vlua_run_string(vlua,
297 297 "print(vifm.version.api.atleast(0, 1))")); "print(vifm.version.api.atleast(0, 1))"));
298 assert_string_equal("true", ui_sb_last());
299
300 ui_sb_msg("");
301 assert_success(vlua_run_string(vlua,
302 "print(vifm.version.api.atleast(0, 1, 1))"));
303 assert_string_equal("false", ui_sb_last());
304
305 ui_sb_msg("");
306 assert_success(vlua_run_string(vlua,
307 "print(vifm.version.api.atleast(0, 2))"));
298 308 assert_string_equal("false", ui_sb_last()); assert_string_equal("false", ui_sb_last());
299 309
300 310 ui_sb_msg(""); ui_sb_msg("");
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master