summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/hi.c3
-rw-r--r--bin/man1/hi.13
2 files changed, 5 insertions, 1 deletions
diff --git a/bin/hi.c b/bin/hi.c
index d071a876..572276f7 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
sion to 3.3.3p1 3.3.3p1June McEnroe 2021-05-25build: Add scripts to EXTRA_DISTJune McEnroe 2021-05-25import: Add missing scripts/wrap-compiler-for-flag-checkJune McEnroe 2021-05-08Import LibreSSL 3.3.3June McEnroe 2021-04-18build: Remove added x509_verify.3 links 3.3.2June McEnroe 2021-04-18tls: Use EC_KEY_set_ex_dataJune McEnroe 2021-04-18Import LibreSSL 3.3.2June McEnroe 2021-03-05Bump version to 3.3.1p1 3.3.1p1June McEnroe 2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe 2020-12-15Import LibreSSL 3.3.1June McEnroe 2020-11-24Import LibreSSL 3.3.0June McEnroe 2020-10-22Import LibreSSL 3.2.2June McEnroe 2020-09-29Import LibreSSL 3.2.1June McEnroe 2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe 2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe 2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe