From 8110bc3af5c547b91cdd863c575b5a9c13f62b8e Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 10 Feb 2019 20:34:20 -0500 Subject: Add plain text "language" to hi --- bin/hi.c | 3 ++- bin/man1/hi.1 | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/hi.c b/bin/hi.c index 50b9b064..8a254ce9 100644 --- a/bin/hi.c +++ b/bin/hi.c @@ -213,6 +213,7 @@ static const struct Language { { "make", "[.]mk$|^Makefile$", MakeSyntax, ARRAY_LEN(MakeSyntax) }, { "mdoc", "[.][1-9]$", MdocSyntax, ARRAY_LEN(MdocSyntax) }, { "sh", "[.]sh$", ShSyntax, ARRAY_LEN(ShSyntax) }, + { "text", "[.]txt$", NULL, 0 }, }; static regex_t compile(const char *pattern, int flags) { @@ -634,7 +635,7 @@ int main(int argc, char *argv[]) { name = strrchr(path, '/'); name = (name ? &name[1] : path); } - if (!lang.syntax && !matchLanguage(&lang, name)) { + if (!lang.name && !matchLanguage(&lang, name)) { errx(EX_USAGE, "cannot infer language for %s", name); } if (!opts[Title]) opts[Title] = name; diff --git a/bin/man1/hi.1 b/bin/man1/hi.1 index 046b6384..48df1606 100644 --- a/bin/man1/hi.1 +++ b/bin/man1/hi.1 @@ -142,4 +142,7 @@ only with a delimiter of .Ql EOF . Arbitrarily nested strings and command substitutions are not highlighted correctly. +. +.It Cm text +Plain text. .El -- cgit 1.4.1 '/zlib-man-pages/log/inflateBackEnd.3?follow=1'>log tree commit diff homepage
path: root/inflateBackEnd.3 (unfollow)
Commit message (Expand)Author
2019-02-19Add SEE ALSO, HISTORY and AUTHORS sectionsJune McEnroe
2019-02-19Filter out reference errors from lintJune McEnroe
2019-02-19Replace Makefile with portable oneJune McEnroe
2019-02-19Replace dates with date on header fileJune McEnroe
2018-11-15Add gzerror.3June McEnroe
2018-11-15Add gzclose_* Nm linesJune McEnroe
2018-11-15Add gzclose.3June McEnroe
2018-11-15Add gzdirect.3June McEnroe
2018-11-15Add gzeof.3June McEnroe
2018-11-13Add gzoffset.3June McEnroe
2018-11-13Add gztell(3) to gzseek.3June McEnroe
2018-11-13Add gzseek.3June McEnroe
2018-11-13Add gzflush.3June McEnroe
2018-11-13Fix spacing after parenthetical sentencesJune McEnroe
2018-11-13Add gzungetc.3June McEnroe
2018-11-13Add gzgetc.3June McEnroe
2018-11-13Add gzputc.3June McEnroe
2018-11-13Add gzgets.3June McEnroe
2018-11-13Add gzputs.3June McEnroe
2018-11-13Add gzprintf.3June McEnroe
2018-11-13Add gzfwrite.3June McEnroe
2018-11-13Add gzwrite.3June McEnroe
2018-11-12Add gzfread.3June McEnroe
2018-11-12Add gzread.3June McEnroe
2018-11-12Add gzsetparams.3June McEnroe
2018-11-12Add gzbuffer.3June McEnroe
2018-11-12Add gzdopen to gzopen.3June McEnroe
2018-11-12Add gzopen.3June McEnroe
2018-11-12Add inflateBackEnd.3June McEnroe
2018-11-12Add inflateBack.3June McEnroe
2018-11-12Add inflateBackInit.3June McEnroe
2018-11-11Add inflateGetHeader.3June McEnroe
2018-11-11Add inflateMark.3June McEnroe
2018-11-11Add inflatePrime.3June McEnroe
2018-11-11Add inflateReset.3June McEnroe
2018-11-11Add inflateCopy.3June McEnroe
2018-11-11Add inflateSync.3June McEnroe
2018-11-11Add inflateGetDictionary.3June McEnroe
2018-11-11Add inflateSetDictionary.3June McEnroe
2018-11-11Add inflateInit2.3June McEnroe