diff --git a/docs/api/bait.md b/docs/api/bait.md index 3e40f8f..a70eb17 100644 --- a/docs/api/bait.md +++ b/docs/api/bait.md @@ -21,11 +21,11 @@ Catches a hook with `name`. Runs the `cb` when it is thrown ### catchOnce(name, cb) Same as catch, but only runs the `cb` once and then removes the hook -### hooks(name) -> {} +### hooks(name) -> table Returns a table with hooks (callback functions) on the event with `name`. ### release(name, catcher) -Removes the `catcher` for the event with `name` +Removes the `catcher` for the event with `name`. For this to work, `catcher` has to be the same function used to catch an event, like one saved to a variable. diff --git a/docs/api/fs.md b/docs/api/fs.md index 3a8390a..ee6949f 100644 --- a/docs/api/fs.md +++ b/docs/api/fs.md @@ -13,25 +13,25 @@ and other things, and acts an addition to the Lua standard library's I/O and filesystem functions. ## Functions -### abs(path) +### abs(path) -> string Gives an absolute version of `path`. -### basename(path) +### basename(path) -> string Gives the basename of `path`. For the rules, see Go's filepath.Base ### cd(dir) Changes directory to `dir` -### dir(path) +### dir(path) -> string Returns the directory part of `path`. For the rules, see Go's filepath.Dir -### glob(pattern) +### glob(pattern) -> matches (table) Glob all files and directories that match the pattern. For the rules, see Go's filepath.Glob -### join(...) +### join(...) -> string Takes paths and joins them together with the OS's directory separator (forward or backward slash). diff --git a/docs/api/hilbish/hilbish.completions.md b/docs/api/hilbish/hilbish.completions.md index bcfd2f9..6f8740f 100644 --- a/docs/api/hilbish/hilbish.completions.md +++ b/docs/api/hilbish/hilbish.completions.md @@ -11,18 +11,19 @@ menu: The completions interface deals with tab completions. ## Functions -### call(name, query, ctx, fields) +### 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` +of `command.name`, example: `command.git`. +You can check `doc completions` for info on the `completionGroups` return value. ### handler(line, pos) The handler function is the callback for tab completion in Hilbish. You can check the completions doc for more info. -### bins(query, ctx, fields) +### bins(query, ctx, fields) -> entries (table), prefix (string) Returns binary/executale completion candidates based on the provided query. -### files(query, ctx, fields) +### files(query, ctx, fields) -> entries (table), prefix (string) Returns file completion candidates based on the provided query. diff --git a/docs/api/hilbish/hilbish.editor.md b/docs/api/hilbish/hilbish.editor.md index bb0f257..30a3842 100644 --- a/docs/api/hilbish/hilbish.editor.md +++ b/docs/api/hilbish/hilbish.editor.md @@ -12,10 +12,10 @@ The hilbish.editor interface provides functions to directly interact with the line editor in use. ## Functions -### getLine() +### getLine() -> string Returns the current input line. -### getVimRegister(register) +### getVimRegister(register) -> string Returns the text that is at the register. ### insert(text) diff --git a/docs/api/hilbish/hilbish.history.md b/docs/api/hilbish/hilbish.history.md index f297ab2..9fa9b01 100644 --- a/docs/api/hilbish/hilbish.history.md +++ b/docs/api/hilbish/hilbish.history.md @@ -16,12 +16,15 @@ method of saving history. ### 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() +### size() -> number Returns the amount of commands in the history. diff --git a/emmyLuaDocs/bait.lua b/emmyLuaDocs/bait.lua index ff16414..35a37ed 100644 --- a/emmyLuaDocs/bait.lua +++ b/emmyLuaDocs/bait.lua @@ -17,7 +17,7 @@ function bait.catchOnce(name, cb) end --- @returns table function bait.hooks(name) end ---- Removes the `catcher` for the event with `name` +--- Removes the `catcher` for the event with `name`. --- For this to work, `catcher` has to be the same function used to catch --- an event, like one saved to a variable. --- @param name string diff --git a/emmyLuaDocs/fs.lua b/emmyLuaDocs/fs.lua index 3aaed30..e974ab9 100644 --- a/emmyLuaDocs/fs.lua +++ b/emmyLuaDocs/fs.lua @@ -4,10 +4,12 @@ local fs = {} --- Gives an absolute version of `path`. --- @param path string +--- @returns string function fs.abs(path) end --- Gives the basename of `path`. For the rules, --- see Go's filepath.Base +--- @returns string function fs.basename(path) end --- Changes directory to `dir` @@ -17,16 +19,19 @@ function fs.cd(dir) end --- Returns the directory part of `path`. For the rules, see Go's --- filepath.Dir --- @param path string +--- @returns string function fs.dir(path) end --- Glob all files and directories that match the pattern. --- For the rules, see Go's filepath.Glob --- @param pattern string +--- @returns table function fs.glob(pattern) end --- Takes paths and joins them together with the OS's --- directory separator (forward or backward slash). ---- @vararg any +--- @vararg string +--- @returns string function fs.join(...) end --- Makes a directory called `name`. If `recursive` is true, it will create its parent directories. diff --git a/emmyLuaDocs/hilbish.lua b/emmyLuaDocs/hilbish.lua index d50c58b..8b20583 100644 --- a/emmyLuaDocs/hilbish.lua +++ b/emmyLuaDocs/hilbish.lua @@ -16,7 +16,8 @@ function hilbish.runner.setMode(cb) end --- 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` +--- of `command.name`, example: `command.git`. +--- You can check `doc completions` for info on the `completionGroups` return value. --- @param name string --- @param query string --- @param ctx string @@ -242,6 +243,10 @@ function hilbish.jobs.last() end --- @param cmd string function hilbish.history.add(cmd) end +--- Retrieves all history. +--- @returns table +function hilbish.history.all() end + --- Deletes all commands from the history. function hilbish.history.clear() end