clp

command line syntax highlighter
git clone git://jeskin.net/clp.git
README | Log | Files | Refs | LICENSE

commit 1530dabc6adb513569552709456bcb77b6cced69
parent 0eb0f7ce24a1025de92646245a2b6f71f21b211d
Author: Jon Eskin <eskinjp@gmail.com>
Date:   Wed, 13 Jul 2022 12:39:23 -0400

fix filetype override

Diffstat:
Mclp.c | 10++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/clp.c b/clp.c @@ -11,6 +11,7 @@ #include <libgen.h> #include <signal.h> + #define OPTPARSE_IMPLEMENTATION #include "optparse.h" @@ -85,7 +86,7 @@ static bool package_exists(lua_State *L, const char *name) { int main(int argc, char *argv[]) { struct optparse_long longopts[] = { - {"override-filetype", 't', OPTPARSE_OPTIONAL}, + {"override-filetype", 't', OPTPARSE_REQUIRED}, {0}}; lua_State *L = luaL_newstate(); @@ -107,13 +108,6 @@ int main(int argc, char *argv[]) { lua_path_add(L, CLP_PATH); - // TODO: make this the install dir - /* lua_path_add(L, "/Users/jon/Development/c/clp"); */ - /* lua_path_add(L, "/Users/jon/Development/c/clp/lua"); */ - /* lua_path_add(L, "/Users/jon/Development/c/clp/lexers"); */ - - - const char *xdg_config = getenv("XDG_CONFIG_HOME"); if (xdg_config) { snprintf(path, sizeof path, "%s/clp", xdg_config);