haredoc.1.scd (2931B)
1 haredoc(1) 2 3 # NAME 4 5 haredoc - read and format Hare documentation 6 7 # SYNOPSIS 8 9 *haredoc* [-hat] [-F _format_] [-T _tagset_] [_identifier_|_path_] 10 11 # DESCRIPTION 12 13 *haredoc* reads documentation from a source file or module. If no identifier or 14 path is supplied, documentation is read from the Hare module contained in the 15 current working directory, or from the root of the standard library if the 16 current working directory doesn't contain a Hare module (see *hare-module*(5)). 17 18 If an identifier is supplied, it's first looked up as a declaration. If no 19 suitable declaration exists, it's looked up as a module instead. The identifier 20 may also include a trailing ::, in which case it will always be treated as a 21 module. The identifier is resolved using the algorithm described in *DEPENDENCY 22 RESOLUTION* in *hare-module*(5). 23 24 # OPTIONS 25 26 *-h* 27 Print the help text. 28 29 *-a* 30 Show undocumented members. 31 32 *-F* _format_ 33 Select output format (one of "html" or "tty"). The default is "tty". 34 35 *-t* 36 Disable HTML template (only applies to *-Fhtml*). 37 38 *-T* _tagset_ 39 Set or unset build tags. See *BUILD TAGS* in *hare-module*(5). 40 41 # CUSTOMIZING COLORS 42 43 Unless the *NO_COLOR* environment variable is set to a non-empty string, colors 44 are rendered in the terminal with ANSI SGR escape sequences. These sequences can 45 be customized with the *HAREDOC_COLORS* environment variable, which follows this 46 whitespace-delimited format: 47 48 HAREDOC\_COLORS='_key_=_seq_ _key_=_seq_ _..._' 49 50 Each _key=seq_ entry assigns a valid _seq_ SGR sequence to a _key_ syntax 51 category. A valid _seq_ must consist only of digits and semicolons, or must be a 52 single underscore "\_". Here are the initial default entries: 53 54 . normal "0" 55 . primary "\_" (-> normal) 56 . ident "\_" (-> normal) 57 . comment "1" 58 . constant "\_" (-> primary) 59 . function "\_" (-> primary) 60 . global "\_" (-> primary) 61 . typedef "\_" (-> primary) 62 . import_alias "\_" (-> normal) 63 . secondary "\_" (-> normal) 64 . keyword "94" 65 . type "96" 66 . attribute "33" 67 . operator "1" 68 . punctuation "\_" (-> normal) 69 . rune_string "91" 70 . number "95" 71 . label "\_" (-> normal) 72 73 Any number of entries can be specified. If a _seq_ is an underscore "\_", then 74 the sequence specified for "normal" is used, unless _key_ is "constant", 75 "function", "global", or "typedef", in which case the sequence specified for 76 "primary" is used. Otherwise, if a _seq_ is invalid, blank, empty, or absent, 77 its corresponding default sequence is used. 78 79 For example: 80 81 HAREDOC\_COLORS='comment=3 primary=1;4 attribute=41' haredoc log 82 83 # ENVIRONMENT 84 85 The following environment variables affect *haredoc*'s execution: 86 87 |[ *HAREPATH* 88 :< The list of directories to search for modules in. See *hare-module*(5). 89 | *NO_COLOR* 90 : Disables all color output when set to a non-empty string. 91 | *HAREDOC_COLORS* 92 : See *CUSTOMIZING COLORS*. 93 94 # SEE ALSO 95 96 *haredoc*(5)