Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
haredoc(1)		     General Commands Manual		      haredoc(1)

NAME
     haredoc - read and format Hare documentation

SYNOPSIS
     haredoc [-hanNt] [-F format] [-T tagset] [identifier|path]

DESCRIPTION
     haredoc  reads documentation from a source file or module. If no identifier
     or path is supplied, documentation is read from the Hare  module  contained
     in  the current working directory, or from the root of the standard library
     if the current working directory doesn't contain a Hare module  (see  hare-
     module(5)).

     If  an identifier is supplied, it's first looked up as a declaration. If no
     suitable declaration exists, it's looked up as a module instead. The  iden-
     tifier  may  also	include  a  trailing ::, in which case it will always be
     treated as a module. The identifier is resolved  using  the  algorithm  de-
     scribed in DEPENDENCY RESOLUTION in hare-module(5).

OPTIONS
     -h
	 Print the help text.

     -a
	 Show undocumented members.

     -F format
	 Select output format (one of "html" or "tty"). The default is "tty".

     -n
	 Include  file names and line numbers of symbol declarations in the out-
	 put (only applies to -Ftty).

     -N
	 Print the file name and line number of a single symbol to stdout,  then
	 exit.

     -t
	 Disable HTML template (only applies to -Fhtml).

     -T tagset
	 Set or unset build tags. See BUILD TAGS in hare-module(5).

CUSTOMIZING COLORS
     Unless the NO_COLOR environment variable is set to a non-empty string, col-
     ors  are rendered in the terminal with ANSI SGR escape sequences. These se-
     quences can be customized with  the  HAREDOC_COLORS  environment  variable,
     which follows this whitespace-delimited format:

	 HAREDOC_COLORS='key=seq key=seq ...'

     Each  key=seq  entry assigns a valid seq SGR sequence to a key syntax cate-
     gory. A valid seq must consist only of digits and semicolons, or must be  a
     single underscore "_". Here are the initial default entries:

     1.  normal        "0"
     2.  primary       "_" (-> normal)
     3.  ident	       "_" (-> normal)
     4.  comment       "1"
     5.  constant      "_" (-> primary)
     6.  function      "_" (-> primary)
     7.  global        "_" (-> primary)
     8.  typedef       "_" (-> primary)
     9.  import_alias  "_" (-> normal)
     10. secondary     "_" (-> normal)
     11. keyword       "94"
     12. type	       "96"
     13. attribute     "33"
     14. operator      "1"
     15. punctuation   "_" (-> normal)
     16. rune_string   "91"
     17. number        "95"
     18. label	       "_" (-> normal)

     Any number of entries can be specified. If a seq is an underscore "_", then
     the  sequence  specified  for  "normal"  is used, unless key is "constant",
     "function", "global", or "typedef", in which case	the  sequence  specified
     for "primary" is used. Otherwise, if a seq is invalid, blank, empty, or ab-
     sent, its corresponding default sequence is used.

     For example:

	 HAREDOC_COLORS='comment=3 primary=1;4 attribute=41' haredoc log::

ENVIRONMENT
     The following environment variables affect haredoc's execution:

     HAREPATH		The  list  of  directories to search for modules in. See
			hare-module(5).
     NO_COLOR		Disables all  color  output  when  set	to  a  non-empty
			string.
     HAREDOC_COLORS	See CUSTOMIZING COLORS.
     HAREDOC_HTML_SRC	fmt::  string  which  expands  to a URL where a symbol's
			source code is browsable online (used for  -Fhtml)  when
			the  file path relative to the working directory and the
			line number is given as the first and second argument to
			fmt:: respectively.

SEE ALSO
     haredoc(5)

				   2026-08-27			      haredoc(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=haredoc&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help