From 9beef6bdace1e70b5f3097896a955892e324800a Mon Sep 17 00:00:00 2001 From: sanine Date: Tue, 4 Jan 2022 15:57:34 -0600 Subject: implement plugins directory --- src/bindings.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/bindings.c') diff --git a/src/bindings.c b/src/bindings.c index 7a94020..45abf6a 100644 --- a/src/bindings.c +++ b/src/bindings.c @@ -84,6 +84,17 @@ int markdown(lua_State *L) } +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +int current_working_directory(lua_State *L) +{ + char *cwd = getcwd(NULL, 0); + lua_pushstring(L, cwd); + free(cwd); + return 1; +} + + /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ static void throw_directory_error(lua_State *L, char *dir_name); -- cgit v1.2.1