summary refs log tree commit diff
path: root/bin/hilex
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-12-29 00:06:09 -0500
committerJune McEnroe <june@causal.agency>2020-12-29 00:06:09 -0500
commit7e83627b9dcf7b51277966219b52a65e441c1741 (patch)
tree314e9f1047277135dbe16bf88db56013043dc384 /bin/hilex
parentMatch Objective-C #import in C lexer (diff)
downloadsrc-7e83627b9dcf7b51277966219b52a65e441c1741.tar.gz
src-7e83627b9dcf7b51277966219b52a65e441c1741.zip
Add hilex manual page
Diffstat (limited to 'bin/hilex')
-rw-r--r--bin/hilex/hilex.1102
1 files changed, 102 insertions, 0 deletions
diff --git a/bin/hilex/hilex.1 b/bin/hilex/hilex.1
new file mode 100644
index 00000000..8b8e0ec7
--- /dev/null
+++ b/bin/hilex/hilex.1
@@ -0,0 +1,102 @@
+.Dd December 28, 2020
+.Dt HILEX 1
+.Os
+.
+.Sh NAME
+.Nm hilex
+.Nd syntax highlighter
+.
+.Sh SYNOPSIS
+.Nm
+.Op Fl t
+.Op Fl f Ar format
+.Op Fl l Ar lexer
+.Op Fl n Ar name
+.Op Fl o Ar opts
+.Op Ar file
+.
+.Sh DESCRIPTION
+The
+.Nm
+utility
+syntax highlights
+the contents of
+.Ar file
+or standard input
+and formats it on standard output.
+.
+.Pp
+The arguments are as follows:
+.Bl -tag -width "-f format"
+.It Fl f Ar format
+Set the output format.
+See
+.Sx Output Formats .
+The default format is
+.Cm ansi .
+.
+.It Fl l Ar lexer
+Set the input lexer.
+See
+.Sx Input Lexers .
+The default input lexer is inferred from
+.Ar name .
+.
+.It Fl n Ar name
+Set the name used to infer the input lexer.
+The default is the final component of
+.Ar file .
+.
+.It Fl o Ar opts
+Set output format options.
+.Ar opts
+is a comma-separated list of options.
+Options for each output format are documented in
+.Sx Output Formats .
+.
+.It Fl t
+Default to the
+.Cm text
+input lexer if one cannot be inferred.
+.El
+.
+.Ss Output Formats
+.Bl -tag -width Ds
+.It Cm ansi
+Output ANSI terminal control sequences.
+.
+.It Cm irc
+Output IRC formatting codes.
+The options are as follows:
+.Bl -tag -width "monospace"
+.It Cm monospace
+Use the IRCCloud monospace formatting code.
+.El
+.El
+.
+.Ss Input Lexers
+.Bl -tag -width Ds
+.It Cm c
+The C11 language,
+with minimal support for
+.Xr lex 1 ,
+.Xr yacc 1
+and Objective-C input.
+Automatically inferred for
+.Pa *.[chlmy]
+files.
+.
+.It Cm mdoc
+The
+.Xr mdoc 7
+language.
+Automatically inferred for
+.Pa *.[1-9]
+files.
+.
+.It Cm text
+Plain text.
+Automatically inferred for
+.Pa *.txt
+files.
+.El