diff --git a/cmd/docgen/docgen.go b/cmd/docgen/docgen.go index 759827c0..c148ce9e 100644 --- a/cmd/docgen/docgen.go +++ b/cmd/docgen/docgen.go @@ -649,7 +649,7 @@ func generateFile(v module) { typ = p.Type[3:] } - f.WriteString(fmt.Sprintf("`%s` `*%s*`", typ, p.Name)) + f.WriteString(fmt.Sprintf("`%s` _%s_", typ, p.Name)) if isVariadic { f.WriteString(" (This type is variadic. You can pass an infinite amount of parameters with this type.)") } diff --git a/docs/api/bait.md b/docs/api/bait.md index a2ec9d07..8a9857f9 100644 --- a/docs/api/bait.md +++ b/docs/api/bait.md @@ -82,10 +82,10 @@ Catches an event. This function can be used to act on events. #### Parameters -`string` `*name*` +`string` _name_ The name of the hook. -`function` `*cb*` +`function` _cb_ The function that will be called when the hook is thrown. #### Example @@ -113,10 +113,10 @@ Catches an event, but only once. This will remove the hook immediately after it #### Parameters -`string` `*name*` +`string` _name_ The name of the event -`function` `*cb*` +`function` _cb_ The function that will be called when the event is thrown. @@ -137,7 +137,7 @@ Returns a table of functions that are hooked on an event with the corresponding #### Parameters -`string` `*name*` +`string` _name_ The name of the hook @@ -160,10 +160,10 @@ an event, like one saved to a variable. #### Parameters -`string` `*name*` +`string` _name_ Name of the event the hook is on -`function` `*catcher*` +`function` _catcher_ Hook function to remove #### Example @@ -195,10 +195,10 @@ Throws a hook with `name` with the provided `args`. #### Parameters -`string` `*name*` +`string` _name_ The name of the hook. -`any` `*args*` (This type is variadic. You can pass an infinite amount of parameters with this type.) +`any` _args_ (This type is variadic. You can pass an infinite amount of parameters with this type.) The arguments to pass to the hook. #### Example diff --git a/docs/api/commander.md b/docs/api/commander.md index 31a29c7d..0462c612 100644 --- a/docs/api/commander.md +++ b/docs/api/commander.md @@ -81,7 +81,7 @@ Removes the named command. Note that this will only remove Commander-registered #### Parameters -`string` `*name*` +`string` _name_ Name of the command to remove. @@ -103,10 +103,10 @@ it will run the function providing the arguments and sinks. #### Parameters -`string` `*name*` +`string` _name_ Name of the command -`function` `*cb*` +`function` _cb_ Callback to handle command invocation #### Example diff --git a/docs/api/fs.md b/docs/api/fs.md index db562a1a..cb1f2d11 100644 --- a/docs/api/fs.md +++ b/docs/api/fs.md @@ -99,7 +99,7 @@ This can be used to resolve short paths like `..` to `/home/user`. #### Parameters -`string` `*path*` +`string` _path_ @@ -121,7 +121,7 @@ Returns the "basename," or the last part of the provided `path`. If path is empt #### Parameters -`string` `*path*` +`string` _path_ Path to get the base name of. @@ -142,7 +142,7 @@ Changes Hilbish's directory to `dir`. #### Parameters -`string` `*dir*` +`string` _dir_ Path to change directory to. @@ -164,7 +164,7 @@ Returns the directory part of `path`. If a file path like #### Parameters -`string` `*path*` +`string` _path_ Path to get the directory for. @@ -186,7 +186,7 @@ For the syntax' refer to Go's filepath.Match function: https://pkg.go.dev/path/f #### Parameters -`string` `*pattern*` +`string` _pattern_ Pattern to compare files with. #### Example @@ -221,7 +221,7 @@ Takes any list of paths and joins them based on the operating system's path sepa #### Parameters -`string` `*path*` (This type is variadic. You can pass an infinite amount of parameters with this type.) +`string` _path_ (This type is variadic. You can pass an infinite amount of parameters with this type.) Paths to join together #### Example @@ -250,10 +250,10 @@ With `recursive`, mkdir will create parent directories. #### Parameters -`string` `*name*` +`string` _name_ Name of the directory -`boolean` `*recursive*` +`boolean` _recursive_ Whether to create parent directories for the provided name #### Example @@ -301,7 +301,7 @@ Returns a list of all files and directories in the provided path. #### Parameters -`string` `*dir*` +`string` _dir_ @@ -327,7 +327,7 @@ isDir (boolean) - If the path is a directory #### Parameters -`string` `*path*` +`string` _path_ #### Example diff --git a/docs/api/hilbish.md b/docs/api/hilbish.md index c01a9e90..1afd2bf8 100644 --- a/docs/api/hilbish.md +++ b/docs/api/hilbish.md @@ -104,10 +104,10 @@ Sets an alias, with a name of `cmd` to another command. #### Parameters -`string` `*cmd*` +`string` _cmd_ Name of the alias -`string` `*orig*` +`string` _orig_ Command that will be aliased #### Example @@ -138,7 +138,7 @@ Appends the provided dir to the command path (`$PATH`) #### Parameters -`string|table` `*dir*` +`string|table` _dir_ Directory (or directories) to append to path #### Example @@ -175,10 +175,10 @@ provides more details. #### Parameters -`string` `*scope*` +`string` _scope_ -`function` `*cb*` +`function` _cb_ #### Example @@ -246,7 +246,7 @@ This can be used to do an in-place restart. #### Parameters -`string` `*cmd*` +`string` _cmd_ @@ -270,7 +270,7 @@ This can be used to run any function in another thread at the same time as other #### Parameters -`function` `*fn*` +`function` _fn_ @@ -295,7 +295,7 @@ Note that to set a highlighter, one has to override this function. #### Parameters -`string` `*line*` +`string` _line_ #### Example @@ -330,10 +330,10 @@ override this function with your custom handler. #### Parameters -`string` `*line*` +`string` _line_ -`number` `*pos*` +`number` _pos_ Position of cursor in line. Usually equals string.len(line) #### Example @@ -364,7 +364,7 @@ Vim-like with modes and Vim keybinds. #### Parameters -`string` `*mode*` +`string` _mode_ Can be set to either `emacs` or `vim` @@ -386,10 +386,10 @@ This creates a timer that ticking immediately. #### Parameters -`function` `*cb*` +`function` _cb_ -`number` `*time*` +`number` _time_ Time in milliseconds. @@ -411,7 +411,7 @@ This will show up when text is incomplete, like a missing quote #### Parameters -`string` `*str*` +`string` _str_ #### Example @@ -451,7 +451,7 @@ Prepends `dir` to $PATH. #### Parameters -`string` `*dir*` +`string` _dir_ @@ -477,10 +477,10 @@ These will be formatted and replaced with the appropriate values. #### Parameters -`string` `*str*` +`string` _str_ -`string` `*typ?*` +`string` _typ?_ Type of prompt, being left or right. Left by default. #### Example @@ -512,7 +512,7 @@ Returns `input`, will be nil if Ctrl-D is pressed, or an error occurs. #### Parameters -`string` `*prompt?*` +`string` _prompt?_ Text to print before input, can be empty. @@ -534,10 +534,10 @@ This creates a Timer that starts ticking immediately. #### Parameters -`function` `*cb*` +`function` _cb_ -`number` `*time*` +`number` _time_ Time to run in milliseconds. @@ -559,7 +559,7 @@ Will return the path of the binary, or a basename if it's a commander. #### Parameters -`string` `*name*` +`string` _name_