## Types
## Sink
A sink is a structure that has input and/or output to/from
a desination.
diff --git a/docs/api/hilbish/hilbish.aliases.md b/docs/api/hilbish/hilbish.aliases.md
index 1936b47..da6cd65 100644
--- a/docs/api/hilbish/hilbish.aliases.md
+++ b/docs/api/hilbish/hilbish.aliases.md
@@ -11,23 +11,55 @@ menu:
The alias interface deals with all command aliases in Hilbish.
## Functions
-### hilbish.aliases.add(alias, cmd)
+|||
+|----|----|
+|
add(alias, cmd)|This is an alias (ha) for the `hilbish.alias` function.|
+|
delete(name)|Removes an alias.|
+|
list() -> table|Get a table of all aliases, with string keys as the alias and the value as the command.|
+|
resolve(alias) -> command (string)|Tries to resolve an alias to its command.|
+
+
+
+hilbish.aliases.add(alias, cmd)
+
+
+
+
+
This is an alias (ha) for the `hilbish.alias` function.
#### Parameters
This function has no parameters.
+
+
+hilbish.aliases.delete(name)
+
+
+
+
-### hilbish.aliases.delete(name)
Removes an alias.
#### Parameters
This function has no parameters.
+
+
+hilbish.aliases.list() -> table\
+
+
+
+
-### hilbish.aliases.list() -> table\
Get a table of all aliases, with string keys as the alias and the value as the command.
#### Parameters
This function has no parameters.
+
+
+hilbish.aliases.resolve(alias) -> command (string)
+
+
+
+
-### hilbish.aliases.resolve(alias) -> command (string)
Tries to resolve an alias to its command.
#### Parameters
This function has no parameters.
-
+
\ No newline at end of file
diff --git a/docs/api/hilbish/hilbish.completions.md b/docs/api/hilbish/hilbish.completions.md
index 6ec1206..726e7e9 100644
--- a/docs/api/hilbish/hilbish.completions.md
+++ b/docs/api/hilbish/hilbish.completions.md
@@ -11,27 +11,59 @@ menu:
The completions interface deals with tab completions.
## Functions
-### hilbish.completions.call(name, query, ctx, fields) -> completionGroups (table), prefix (string)
+|||
+|----|----|
+|
call(name, query, ctx, fields) -> completionGroups (table), prefix (string)|Calls a completer function. This is mainly used to call|
+|
handler(line, pos)|The handler function is the callback for tab completion in Hilbish.|
+|
bins(query, ctx, fields) -> entries (table), prefix (string)|Returns binary/executale completion candidates based on the provided query.|
+|
files(query, ctx, fields) -> entries (table), prefix (string)|Returns file completion candidates based on the provided query.|
+
+
+
+hilbish.completions.call(name, query, ctx, fields) -> completionGroups (table), prefix (string)
+
+
+
+
+
Calls a completer function. This is mainly used to call
a command completer, which will have a `name` in the form
of `command.name`, example: `command.git`.
You can check `doc completions` for info on the `completionGroups` return value.
#### Parameters
This function has no parameters.
+
+
+hilbish.completions.handler(line, pos)
+
+
+
+
-### hilbish.completions.handler(line, pos)
The handler function is the callback for tab completion in Hilbish.
You can check the completions doc for more info.
#### Parameters
This function has no parameters.
+
+
+hilbish.completions.bins(query, ctx, fields) -> entries (table), prefix (string)
+
+
+
+
-### hilbish.completions.bins(query, ctx, fields) -> entries (table), prefix (string)
Returns binary/executale completion candidates based on the provided query.
#### Parameters
This function has no parameters.
+
+
+hilbish.completions.files(query, ctx, fields) -> entries (table), prefix (string)
+
+
+
+
-### hilbish.completions.files(query, ctx, fields) -> entries (table), prefix (string)
Returns file completion candidates based on the provided query.
#### Parameters
This function has no parameters.
-
+
\ No newline at end of file
diff --git a/docs/api/hilbish/hilbish.editor.md b/docs/api/hilbish/hilbish.editor.md
index e10aca9..38b247e 100644
--- a/docs/api/hilbish/hilbish.editor.md
+++ b/docs/api/hilbish/hilbish.editor.md
@@ -12,23 +12,55 @@ The hilbish.editor interface provides functions to
directly interact with the line editor in use.
## Functions
-### hilbish.editor.getLine() -> string
+|||
+|----|----|
+|
getLine() -> string|Returns the current input line.|
+|
getVimRegister(register) -> string|Returns the text that is at the register.|
+|
insert(text)|Inserts text into the line.|
+|
setVimRegister(register, text)|Sets the vim register at `register` to hold the passed text.|
+
+
+
+hilbish.editor.getLine() -> string
+
+
+
+
+
Returns the current input line.
#### Parameters
This function has no parameters.
+
+
+hilbish.editor.getVimRegister(register) -> string
+
+
+
+
-### hilbish.editor.getVimRegister(register) -> string
Returns the text that is at the register.
#### Parameters
This function has no parameters.
+
+
+hilbish.editor.insert(text)
+
+
+
+
-### hilbish.editor.insert(text)
Inserts text into the line.
#### Parameters
This function has no parameters.
+
+
+hilbish.editor.setVimRegister(register, text)
+
+
+
+
-### hilbish.editor.setVimRegister(register, text)
Sets the vim register at `register` to hold the passed text.
#### Parameters
This function has no parameters.
-
+
\ No newline at end of file
diff --git a/docs/api/hilbish/hilbish.history.md b/docs/api/hilbish/hilbish.history.md
index 902155f..0f60370 100644
--- a/docs/api/hilbish/hilbish.history.md
+++ b/docs/api/hilbish/hilbish.history.md
@@ -13,28 +13,67 @@ This includes the ability to override functions to change the main
method of saving history.
## Functions
-### hilbish.history.add(cmd)
+|||
+|----|----|
+|
add(cmd)|Adds a command to the history.|
+|
all() -> table|Retrieves all history.|
+|
clear()|Deletes all commands from the history.|
+|
get(idx)|Retrieves a command from the history based on the `idx`.|
+|
size() -> number|Returns the amount of commands in the history.|
+
+
+
+hilbish.history.add(cmd)
+
+
+
+
+
Adds a command to the history.
#### Parameters
This function has no parameters.
+
+
+hilbish.history.all() -> table
+
+
+
+
-### hilbish.history.all() -> table
Retrieves all history.
#### Parameters
This function has no parameters.
+
+
+hilbish.history.clear()
+
+
+
+
-### hilbish.history.clear()
Deletes all commands from the history.
#### Parameters
This function has no parameters.
+
+
+hilbish.history.get(idx)
+
+
+
+
-### hilbish.history.get(idx)
Retrieves a command from the history based on the `idx`.
#### Parameters
This function has no parameters.
+
+
+hilbish.history.size() -> number
+
+
+
+
-### hilbish.history.size() -> number
Returns the amount of commands in the history.
#### Parameters
This function has no parameters.
-
+
\ No newline at end of file
diff --git a/docs/api/hilbish/hilbish.jobs.md b/docs/api/hilbish/hilbish.jobs.md
index 5f8992d..f27bc98 100644
--- a/docs/api/hilbish/hilbish.jobs.md
+++ b/docs/api/hilbish/hilbish.jobs.md
@@ -15,32 +15,70 @@ Jobs are the name of background tasks/commands. A job can be started via
interactive usage or with the functions defined below for use in external runners.
## Functions
-### hilbish.jobs.add(cmdstr, args, execPath)
+|||
+|----|----|
+|
add(cmdstr, args, execPath)|Adds a new job to the job table. Note that this does not immediately run it.|
+|
all() -> table<@Job>|Returns a table of all job objects.|
+|
disown(id)|Disowns a job. This deletes it from the job table.|
+|
get(id) -> @Job|Get a job object via its ID.|
+|
last() -> @Job|Returns the last added job from the table.|
+
+
+
+hilbish.jobs.add(cmdstr, args, execPath)
+
+
+
+
+
Adds a new job to the job table. Note that this does not immediately run it.
#### Parameters
This function has no parameters.
+
+
+hilbish.jobs.all() -> table\<Job>
+
+
+
+
-### hilbish.jobs.all() -> table\<
Job>
Returns a table of all job objects.
#### Parameters
This function has no parameters.
+
+
+hilbish.jobs.disown(id)
+
+
+
+
-### hilbish.jobs.disown(id)
Disowns a job. This deletes it from the job table.
#### Parameters
This function has no parameters.
+
+
+hilbish.jobs.get(id) -> Job
+
+
+
+
-### hilbish.jobs.get(id) ->
Job
Get a job object via its ID.
#### Parameters
This function has no parameters.
+
+
+hilbish.jobs.last() -> Job
+
+
+
+
-### hilbish.jobs.last() ->
Job
Returns the last added job from the table.
#### Parameters
This function has no parameters.
-
-## Types
+
## Types
## Job
The Job type describes a Hilbish job.
### Properties
diff --git a/docs/api/hilbish/hilbish.runner.md b/docs/api/hilbish/hilbish.runner.md
index 7729bdd..f5977e1 100644
--- a/docs/api/hilbish/hilbish.runner.md
+++ b/docs/api/hilbish/hilbish.runner.md
@@ -15,23 +15,48 @@ language or script of their choosing. A good example is using it to
write command in Fennel.
## Functions
-### hilbish.runner.setMode(cb)
+|||
+|----|----|
+|
setMode(cb)|This is the same as the `hilbish.runnerMode` function. It takes a callback,|
+|
lua(cmd)|Evaluates `cmd` as Lua input. This is the same as using `dofile`|
+|
sh(cmd)|Runs a command in Hilbish's shell script interpreter.|
+
+
+
+hilbish.runner.setMode(cb)
+
+
+
+
+
This is the same as the `hilbish.runnerMode` function. It takes a callback,
which will be used to execute all interactive input.
In normal cases, neither callbacks should be overrided by the user,
as the higher level functions listed below this will handle it.
#### Parameters
This function has no parameters.
+
+
+hilbish.runner.lua(cmd)
+
+
+
+
-### hilbish.runner.lua(cmd)
Evaluates `cmd` as Lua input. This is the same as using `dofile`
or `load`, but is appropriated for the runner interface.
#### Parameters
This function has no parameters.
+
+
+hilbish.runner.sh(cmd)
+
+
+
+
-### hilbish.runner.sh(cmd)
Runs a command in Hilbish's shell script interpreter.
This is the equivalent of using `source`.
#### Parameters
This function has no parameters.
-
+
\ No newline at end of file
diff --git a/docs/api/hilbish/hilbish.timers.md b/docs/api/hilbish/hilbish.timers.md
index 576c820..20efd7c 100644
--- a/docs/api/hilbish/hilbish.timers.md
+++ b/docs/api/hilbish/hilbish.timers.md
@@ -30,23 +30,40 @@ t:start()
print(t.running) // true
```
+## Functions
+|||
+|----|----|
+|
create(type, time, callback) -> @Timer|Creates a timer that runs based on the specified `time` in milliseconds.|
+|
get(id) -> @Timer|Retrieves a timer via its ID.|
+
## Interface fields
- `INTERVAL`: Constant for an interval timer type
- `TIMEOUT`: Constant for a timeout timer type
-## Functions
-### hilbish.timers.create(type, time, callback) ->
Timer
+
+
+hilbish.timers.create(type, time, callback) -> Timer
+
+
+
+
+
Creates a timer that runs based on the specified `time` in milliseconds.
The `type` can either be `hilbish.timers.INTERVAL` or `hilbish.timers.TIMEOUT`
#### Parameters
This function has no parameters.
+
+
+hilbish.timers.get(id) -> Timer
+
+
+
+
-### hilbish.timers.get(id) ->
Timer
Retrieves a timer via its ID.
#### Parameters
This function has no parameters.
-
-## Types
+
## Types
## Timer
The Job type describes a Hilbish timer.
### Properties
diff --git a/docs/api/terminal.md b/docs/api/terminal.md
index 5ad24c7..5eed445 100644
--- a/docs/api/terminal.md
+++ b/docs/api/terminal.md
@@ -11,24 +11,56 @@ menu:
The terminal library is a simple and lower level library for certain terminal interactions.
## Functions
-### terminal.restoreState()
+|||
+|----|----|
+|
restoreState()|Restores the last saved state of the terminal|
+|
saveState()|Saves the current state of the terminal|
+|
setRaw()|Puts the terminal in raw mode|
+|
size()|Gets the dimensions of the terminal. Returns a table with `width` and `height`|
+
+
+
+terminal.restoreState()
+
+
+
+
+
Restores the last saved state of the terminal
#### Parameters
This function has no parameters.
+
+
+terminal.saveState()
+
+
+
+
-### terminal.saveState()
Saves the current state of the terminal
#### Parameters
This function has no parameters.
+
+
+terminal.setRaw()
+
+
+
+
-### terminal.setRaw()
Puts the terminal in raw mode
#### Parameters
This function has no parameters.
+
+
+terminal.size()
+
+
+
+
-### terminal.size()
Gets the dimensions of the terminal. Returns a table with `width` and `height`
Note: this is not the size in relation to the dimensions of the display
#### Parameters
This function has no parameters.
-
+
\ No newline at end of file
diff --git a/emmyLuaDocs/bait.lua b/emmyLuaDocs/bait.lua
index 35a37ed..6ca76ab 100644
--- a/emmyLuaDocs/bait.lua
+++ b/emmyLuaDocs/bait.lua
@@ -3,8 +3,6 @@
local bait = {}
--- Catches a hook with `name`. Runs the `cb` when it is thrown
---- @param name string
---- @param cb function
function bait.catch(name, cb) end
--- Same as catch, but only runs the `cb` once and then removes the hook
diff --git a/go.mod b/go.mod
index c17d906..792d576 100644
--- a/go.mod
+++ b/go.mod
@@ -4,6 +4,7 @@ go 1.17
require (
github.com/arnodel/golua v0.0.0-20220221163911-dfcf252b6f86
+ github.com/atsushinee/go-markdown-generator v0.0.0-20191121114853-83f9e1f68504
github.com/blackfireio/osinfo v1.0.3
github.com/chuckpreslar/emission v0.0.0-20170206194824-a7ddd980baf9
github.com/maxlandon/readline v0.1.0-beta.0.20211027085530-2b76cabb8036
diff --git a/go.sum b/go.sum
index 1917008..d889ed3 100644
--- a/go.sum
+++ b/go.sum
@@ -16,6 +16,8 @@ github.com/arnodel/edit v0.0.0-20220202110212-dfc8d7a13890/go.mod h1:AcpttpuZBaL
github.com/arnodel/strftime v0.1.6 h1:0hc0pUvk8KhEMXE+htyaOUV42zNcf/csIbjzEFCJqsw=
github.com/arnodel/strftime v0.1.6/go.mod h1:5NbK5XqYK8QpRZpqKNt4OlxLtIB8cotkLk4KTKzJfWs=
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
+github.com/atsushinee/go-markdown-generator v0.0.0-20191121114853-83f9e1f68504 h1:R1/AOzdMbopSliUTTEHvHbyNmnZ3YxY5GvdhTkpPsSY=
+github.com/atsushinee/go-markdown-generator v0.0.0-20191121114853-83f9e1f68504/go.mod h1:kHBCvAXJIatTX1pw6tLiOspjGc3MhUDRlog9yrCUS+k=
github.com/blackfireio/osinfo v1.0.3 h1:Yk2t2GTPjBcESv6nDSWZKO87bGMQgO+Hi9OoXPpxX8c=
github.com/blackfireio/osinfo v1.0.3/go.mod h1:Pd987poVNmd5Wsx6PRPw4+w7kLlf9iJxoRKPtPAjOrA=
github.com/chuckpreslar/emission v0.0.0-20170206194824-a7ddd980baf9 h1:xz6Nv3zcwO2Lila35hcb0QloCQsc38Al13RNEzWRpX4=
diff --git a/golibs/bait/bait.go b/golibs/bait/bait.go
index 269ea1e..dca3773 100644
--- a/golibs/bait/bait.go
+++ b/golibs/bait/bait.go
@@ -12,7 +12,7 @@ You can act on events via callback functions.
Examples of this are in the Hilbish default config!
Consider this part of it:
-```
+```lua
bait.catch('command.exit', function(code)
running = false
doPrompt(code ~= 0)
diff --git a/website/themes/hsh/layouts/partials/head.html b/website/themes/hsh/layouts/partials/head.html
index cb2e12e..087d997 100644
--- a/website/themes/hsh/layouts/partials/head.html
+++ b/website/themes/hsh/layouts/partials/head.html
@@ -37,5 +37,37 @@
opacity: 1;
transition: all .1s ease-in;
}
+
+ @keyframes highlight {
+ 0% {
+ background: none
+ }
+ 50% {
+ background: yellow;
+ }
+ 100% {
+ background: none;
+ }
+ }
+
+ div:target {
+ animation: highlight 1s;
+ animation-timing-function: cubic-bezier(1,-0.02,.45,.89);
+ }
+
+ table {
+ border-width: 1px;
+ border-style: solid;
+ border-color: #565c64;;
+ border-collapse: collapse;
+ }
+
+ table td {
+ padding: 5px;
+ }
+
+ table tr {
+ border-width: 1px;
+ }