clp

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

commit c4ffc691f4db49b73271e6e7406fd59760159702
parent a584733996430fa8396bb332484a05903e4d4c29
Author: Jon Eskin <eskinjp@gmail.com>
Date:   Mon, 18 Jul 2022 11:21:53 -0400

Fix formatting and update man page for highlight line option

Diffstat:
Mclp.c | 14+++++++-------
Mman/clp.1 | 3+++
2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/clp.c b/clp.c @@ -86,7 +86,7 @@ static bool package_exists(lua_State *L, const char *name) { int main(int argc, char *argv[]) { struct optparse_long longopts[] = { - {"highlight_line", 'h', OPTPARSE_REQUIRED}, + {"highlight-line", 'h', OPTPARSE_REQUIRED}, {"override-filetype", 't', OPTPARSE_REQUIRED}, {"list-overrides", 'l', OPTPARSE_NONE}, {0}}; @@ -155,15 +155,15 @@ int main(int argc, char *argv[]) { return 0; case 't': filetype_override = options.optarg; - lua_pushliteral(L, "filetype_override"); - lua_pushstring(L, filetype_override); - lua_settable(L, -3); + lua_pushliteral(L, "filetype_override"); + lua_pushstring(L, filetype_override); + lua_settable(L, -3); break; case 'h': highlight_line = atoi(options.optarg); - lua_pushliteral(L, "highlight_line"); - lua_pushinteger(L, highlight_line); - lua_settable(L, -3); + lua_pushliteral(L, "highlight_line"); + lua_pushinteger(L, highlight_line); + lua_settable(L, -3); break; } } diff --git a/man/clp.1 b/man/clp.1 @@ -18,3 +18,6 @@ See below. .TP .BR \-t ", " \-\-override-filetype=\fIFILETYPE\fR Force a language's syntax for highlighting the file. To see available filetypes, run \fBclp \-\-list\-overrides\fR\ +.TP +.BR \-t ", " \-\-highlight-line=\fILINE NUMBER\fR +Highlight a non-blank line by inverting its colors