diff --git a/cmd/docgen/docgen.lua b/cmd/docgen/docgen.lua index 0ae2837..77015f5 100644 --- a/cmd/docgen/docgen.lua +++ b/cmd/docgen/docgen.lua @@ -74,7 +74,7 @@ for _, fname in ipairs(files) do end end - pieces[mod][funcName] = dps + table.insert(pieces[mod], {funcName, dps}) end docPiece = {} goto continue2 @@ -142,7 +142,10 @@ for iface, dps in pairs(pieces) do end end - for func, docs in pairs(dps) do + table.sort(dps, function(a, b) return a[1] < b[1] end) + for _, piece in pairs(dps) do + local func = piece[1] + local docs = piece[2] local sig = string.format('%s.%s(', iface, func) local params = '' for idx, param in ipairs(docs.params) do diff --git a/docs/api/hilbish/hilbish.messages.md b/docs/api/hilbish/hilbish.messages.md index 2dff7a7..705cfa2 100644 --- a/docs/api/hilbish/hilbish.messages.md +++ b/docs/api/hilbish/hilbish.messages.md @@ -23,8 +23,8 @@ The `hilbish.message` type is a table with the following keys: ||| |----|----| |unreadCount()|Returns the amount of unread messages.| -|readAll()|Marks all messages as read.| |send(message)|Sends a message.| +|readAll()|Marks all messages as read.| |read(idx)|Marks a message at `idx` as read.| |delete(idx)|Deletes the message at `idx`.| |clear()|Deletes all messages.| @@ -89,6 +89,20 @@ Marks a message at `idx` as read. +
+
+

+hilbish.messages.readAll() + + + +

+ +Marks all messages as read. +#### Parameters +This function has no parameters. +
+

@@ -105,20 +119,6 @@ Sends a message.

-
-
-

-hilbish.messages.readAll() - - - -

- -Marks all messages as read. -#### Parameters -This function has no parameters. -
-

diff --git a/docs/api/hilbish/hilbish.os.md b/docs/api/hilbish/hilbish.os.md deleted file mode 100644 index 13b56b0..0000000 --- a/docs/api/hilbish/hilbish.os.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Module hilbish.os -description: operating system info -layout: doc -menu: - docs: - parent: "API" ---- - -## Introduction -Provides simple text information properties about the current operating system. -This mainly includes the name and version. - -## Static module fields -||| -|----|----| -|family|Family name of the current OS| -|name|Pretty name of the current OS| -|version|Version of the current OS| - diff --git a/docs/api/hilbish/hilbish.runner.md b/docs/api/hilbish/hilbish.runner.md index 305348a..4ba4999 100644 --- a/docs/api/hilbish/hilbish.runner.md +++ b/docs/api/hilbish/hilbish.runner.md @@ -55,15 +55,15 @@ end) ||| |----|----| |lua(cmd)|Evaluates `cmd` as Lua input. This is the same as using `dofile`| -|exec(cmd, runnerName)|Executes `cmd` with a runner.| +|sh()|nil| +|setMode(mode)|**NOTE: This function is deprecated and will be removed in 3.0**| +|setCurrent(name)|Sets Hilbish's runner mode by name.| +|set(name, runner)|*Sets* a runner by name. The difference between this function and| |run(input, priv)|Runs `input` with the currently set Hilbish runner.| |getCurrent()|Returns the current runner by name.| -|setCurrent(name)|Sets Hilbish's runner mode by name.| -|setMode(mode)|**NOTE: This function is deprecated and will be removed in 3.0**| -|sh()|nil| -|add(name, runner)|Adds a runner to the table of available runners.| -|set(name, runner)|*Sets* a runner by name. The difference between this function and| |get(name)|Get a runner by name.| +|exec(cmd, runnerName)|Executes `cmd` with a runner.| +|add(name, runner)|Adds a runner to the table of available runners.|
@@ -81,43 +81,6 @@ or `load`, but is appropriated for the runner interface. `string` **`cmd`** -
- -
-
-

-hilbish.runner.get(name) - - - -

- -Get a runner by name. -#### Parameters -`name` **`string`** - Name of the runner to retrieve. - -
- -
-
-

-hilbish.runner.set(name, runner) - - - -

- -*Sets* a runner by name. The difference between this function and -add, is set will *not* check if the named runner exists. -The runner table must have the run function in it. -#### Parameters -`name` **`string`** - - -`runner` **`table`** - -

@@ -141,52 +104,38 @@ If runner is a table, it must have the run function in it.


-
+

-hilbish.runner.sh() - +hilbish.runner.exec(cmd, runnerName) +

- +Executes `cmd` with a runner. +If `runnerName` is not specified, it uses the default Hilbish runner. #### Parameters -This function has no parameters. -
+`cmd` **`string`** -
-
-

-hilbish.runner.setMode(mode) - - - -

-**NOTE: This function is deprecated and will be removed in 3.0** -Use `hilbish.runner.setCurrent` instead. -This is the same as the `hilbish.runnerMode` function. -It takes a callback, which will be used to execute all interactive input. -Or a string which names the runner mode to use. -#### Parameters -`mode` **`string|function`** +`runnerName` **`string?`**

-
+

-hilbish.runner.setCurrent(name) - +hilbish.runner.get(name) +

-Sets Hilbish's runner mode by name. +Get a runner by name. #### Parameters `name` **`string`** - + Name of the runner to retrieve.
@@ -226,22 +175,73 @@ This method is how Hilbish executes commands.

-
+

-hilbish.runner.exec(cmd, runnerName) - +hilbish.runner.set(name, runner) +

-Executes `cmd` with a runner. -If `runnerName` is not specified, it uses the default Hilbish runner. +*Sets* a runner by name. The difference between this function and +add, is set will *not* check if the named runner exists. +The runner table must have the run function in it. #### Parameters -`cmd` **`string`** +`name` **`string`** -`runnerName` **`string?`** +`runner` **`table`**
+
+
+

+hilbish.runner.setCurrent(name) + + + +

+ +Sets Hilbish's runner mode by name. +#### Parameters +`name` **`string`** + + +
+ +
+
+

+hilbish.runner.setMode(mode) + + + +

+ +**NOTE: This function is deprecated and will be removed in 3.0** +Use `hilbish.runner.setCurrent` instead. +This is the same as the `hilbish.runnerMode` function. +It takes a callback, which will be used to execute all interactive input. +Or a string which names the runner mode to use. +#### Parameters +`mode` **`string|function`** + + +
+ +
+
+

+hilbish.runner.sh() + + + +

+ + +#### Parameters +This function has no parameters. +
+ diff --git a/docs/nature/dirs.md b/docs/nature/dirs.md index e49247c..7f25706 100644 --- a/docs/nature/dirs.md +++ b/docs/nature/dirs.md @@ -15,43 +15,11 @@ directories. ## Functions ||| |----|----| +|setOld(d)|Sets the old directory string.| |recent(idx)|Get entry from recent directories list based on index.| +|push(dir)|Add `dir` to the recent directories list.| |pop(num)|Remove the specified amount of dirs from the recent directories list.| |peak(num)|Look at `num` amount of recent directories, starting from the latest.| -|push(dir)|Add `dir` to the recent directories list.| -|setOld(d)|Sets the old directory string.| -
-
-

-dirs.setOld(d) - - - -

- -Sets the old directory string. -#### Parameters -`d` **`string`** - - -
- -
-
-

-dirs.push(dir) - - - -

- -Add `dir` to the recent directories list. -#### Parameters -`dir` **`string`** - - -
-

@@ -83,6 +51,22 @@ Remove the specified amount of dirs from the recent directories list. `num` **`number`** +

+ +
+
+

+dirs.push(dir) + + + +

+ +Add `dir` to the recent directories list. +#### Parameters +`dir` **`string`** + +

@@ -101,3 +85,19 @@ Get entry from recent directories list based on index.
+
+
+

+dirs.setOld(d) + + + +

+ +Sets the old directory string. +#### Parameters +`d` **`string`** + + +
+ diff --git a/docs/nature/doc.md b/docs/nature/doc.md index 6a2ca48..f940c0d 100644 --- a/docs/nature/doc.md +++ b/docs/nature/doc.md @@ -17,29 +17,9 @@ is by the Greenhouse pager. ## Functions ||| |----|----| +|renderInfoBlock(type, text)|Renders an info block. An info block is a block of text with| |renderCodeBlock(text)|Assembles and renders a code block. This returns| |highlight(text)|Performs basic Lua code highlighting.| -|renderInfoBlock(type, text)|Renders an info block. An info block is a block of text with| -
-
-

-doc.renderInfoBlock(type, text) - - - -

- -Renders an info block. An info block is a block of text with -an icon and styled text block. -#### Parameters -`type` **`string`** - Type of info block. The only one specially styled is the `warning`. - -`text` **`string`** - - -
-

@@ -74,3 +54,23 @@ and styles it to resemble a code block.

+
+
+

+doc.renderInfoBlock(type, text) + + + +

+ +Renders an info block. An info block is a block of text with +an icon and styled text block. +#### Parameters +`type` **`string`** + Type of info block. The only one specially styled is the `warning`. + +`text` **`string`** + + +
+