diff --git a/docs/api/bait/index.html b/docs/api/bait/index.html index 955c363..2289f3b 100644 --- a/docs/api/bait/index.html +++ b/docs/api/bait/index.html @@ -10,9 +10,9 @@ happened, like when you’ve changed directory, a command has failed, etc. To find all available hooks thrown by Hilbish, see doc hooks.

Functions

catch(name, cb)

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) -> -

Returns a table with hooks (callback functions) on the event with name.

release(name, catcher) -

Removes the catcher for the event with name +

Same as catch, but only runs the cb once and then removes the hook

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. For this to work, catcher has to be the same function used to catch an event, like one saved to a variable.

throw(name, …args)

Throws a hook with name with the provided args

\ No newline at end of file diff --git a/docs/api/fs/index.html b/docs/api/fs/index.html index c20066f..fa09988 100644 --- a/docs/api/fs/index.html +++ b/docs/api/fs/index.html @@ -6,16 +6,16 @@ Hilbish

The fs module provides easy and simple access to filesystem functions and other things, and acts an addition to the Lua standard library’s I/O and filesystem functions.

Functions -

abs(path) -

Gives an absolute version of path.

basename(path) -

Gives the basename of path. For the rules, +

abs(path) -> string +

Gives an absolute version of 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) -

Returns the directory part of path. For the rules, see Go’s -filepath.Dir

glob(pattern) -

Glob all files and directories that match the pattern. -For the rules, see Go’s filepath.Glob

join(…) -

Takes paths and joins them together with the OS’s +

Changes directory to dir

dir(path) -> string +

Returns the directory part of path. For the rules, see Go’s +filepath.Dir

glob(pattern) -> matches (table) +

Glob all files and directories that match the pattern. +For the rules, see Go’s filepath.Glob

join(…) -> string +

Takes paths and joins them together with the OS’s directory separator (forward or backward slash).

mkdir(name, recursive)

Makes a directory called name. If recursive is true, it will create its parent directories.

readdir(dir) ->

Returns a table of files in dir.

stat(path) -> diff --git a/docs/api/hilbish/hilbish.completions/index.html b/docs/api/hilbish/hilbish.completions/index.html index fec38f4..10c9891 100644 --- a/docs/api/hilbish/hilbish.completions/index.html +++ b/docs/api/hilbish/hilbish.completions/index.html @@ -4,11 +4,12 @@ Hilbish

Interface hilbish.completions

tab completions

Introduction

The completions interface deals with tab completions.

Functions -

call(name, query, ctx, fields) -

Calls a completer function. This is mainly used to call +

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

handler(line, pos) +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) -

Returns binary/executale completion candidates based on the provided query.

files(query, ctx, fields) -

Returns file completion candidates based on the provided query.

\ No newline at end of file +You can check the completions doc for more info.

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.

\ No newline at end of file diff --git a/docs/api/hilbish/hilbish.editor/index.html b/docs/api/hilbish/hilbish.editor/index.html index b9efc8b..c645cb3 100644 --- a/docs/api/hilbish/hilbish.editor/index.html +++ b/docs/api/hilbish/hilbish.editor/index.html @@ -5,8 +5,8 @@ Hilbish

Interface hilbish.editor

interactions for Hilbish's line reader

Introduction

The hilbish.editor interface provides functions to directly interact with the line editor in use.

Functions -

getLine() -

Returns the current input line.

getVimRegister(register) -

Returns the text that is at the register.

insert(text) +

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.

\ No newline at end of file diff --git a/docs/api/hilbish/hilbish.history/index.html b/docs/api/hilbish/hilbish.history/index.html index 630c12b..187033d 100644 --- a/docs/api/hilbish/hilbish.history/index.html +++ b/docs/api/hilbish/hilbish.history/index.html @@ -7,7 +7,8 @@ Hilbish This includes the ability to override functions to change the main method of saving history.

Functions

add(cmd) -

Adds a command to the history.

clear() +

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() -

Returns the amount of commands in the history.

\ No newline at end of file +

Retrieves a command from the history based on the idx.

size() -> number +

Returns the amount of commands in the history.

\ No newline at end of file diff --git a/docs/api/hilbish/index.xml b/docs/api/hilbish/index.xml index c0da4ad..09a27e5 100644 --- a/docs/api/hilbish/index.xml +++ b/docs/api/hilbish/index.xml @@ -3,17 +3,17 @@ Functions add(alias, cmd) This is an alias (ha) for the hilbish.alias function. delete(name) Removes an alias. list() -> table<string, string> 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.Interface hilbish.completionshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.completions/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.completions/Introduction The completions interface deals with tab completions. -Functions call(name, query, ctx, fields) 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 -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) Returns binary/executale completion candidates based on the provided query.Interface hilbish.editorhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.editor/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.editor/Introduction The hilbish.editor interface provides functions to directly interact with the line editor in use. -Functions getLine() Returns the current input line. -getVimRegister(register) Returns the text that is at the register. +Functions 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. +handler(line, pos) The handler function is the callback for tab completion in Hilbish. You can check the completions doc for more info.Interface hilbish.editorhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.editor/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.editor/Introduction The hilbish.editor interface provides functions to directly interact with the line editor in use. +Functions 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.Interface hilbish.historyhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.history/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.history/Introduction The history interface deals with command history. This includes the ability to override functions to change the main method of saving history. Functions 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() Returns the amount of commands in the history.Interface hilbish.jobshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.jobs/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.jobs/Introduction Manage interactive jobs in Hilbish via Lua. +size() -> number Returns the amount of commands in the history.Interface hilbish.jobshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.jobs/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.jobs/Introduction Manage interactive jobs in Hilbish via Lua. 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 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. diff --git a/docs/api/index.xml b/docs/api/index.xml index 2ca3d48..3d02af7 100644 --- a/docs/api/index.xml +++ b/docs/api/index.xml @@ -1,11 +1,10 @@ API on Hilbishhttps://rosettea.github.io/Hilbish/docs/api/Recent content in API on HilbishHugo -- gohugo.ioen-usModule baithttps://rosettea.github.io/Hilbish/docs/api/bait/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/bait/Introduction Bait is the event emitter for Hilbish. Why name it bait? Why not. It throws hooks that you can catch. This is what you will use if you want to listen in on hooks to know when certain things have happened, like when you’ve changed directory, a command has failed, etc. To find all available hooks thrown by Hilbish, see doc hooks. Functions catch(name, cb) Catches a hook with name.Module commanderhttps://rosettea.github.io/Hilbish/docs/api/commander/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/commander/Introduction Commander is a library for writing custom commands in Lua. In order to make it easier to write commands for Hilbish, not require separate scripts and to be able to use in a config, the Commander library exists. This is like a very simple wrapper that works with Hilbish for writing commands. Example: local commander = require 'commander' commander.register('hello', function(args, sinks) sinks.out:writeln 'Hello world!' end) In this example, a command with the name of hello is created that will print Hello world!Module fshttps://rosettea.github.io/Hilbish/docs/api/fs/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/fs/Introduction The fs module provides easy and simple access to filesystem functions and other things, and acts an addition to the Lua standard library’s I/O and filesystem functions. -Functions abs(path) Gives an absolute version of path. -basename(path) Gives the basename of path. For the rules, see Go’s filepath.Base +Functions abs(path) -> string Gives an absolute version of 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) Returns the directory part of path. For the rules, see Go’s filepath.Dir -glob(pattern) Glob all files and directories that match the pattern.Module terminalhttps://rosettea.github.io/Hilbish/docs/api/terminal/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/terminal/Introduction The terminal library is a simple and lower level library for certain terminal interactions. +dir(path) -> string Returns the directory part of path. For the rules, see Go’s filepath.Module terminalhttps://rosettea.github.io/Hilbish/docs/api/terminal/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/terminal/Introduction The terminal library is a simple and lower level library for certain terminal interactions. Functions restoreState() Restores the last saved state of the terminal saveState() Saves the current state of the terminal setRaw() Puts the terminal in raw mode diff --git a/index.xml b/index.xml index c725a38..69a959d 100644 --- a/index.xml +++ b/index.xml @@ -10,17 +10,17 @@ Functions add(alias, cmd) This is an alias (ha) for the hilbish.alias function. delete(name) Removes an alias. list() -> table<string, string> 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.Interface hilbish.completionshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.completions/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.completions/Introduction The completions interface deals with tab completions. -Functions call(name, query, ctx, fields) 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 -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) Returns binary/executale completion candidates based on the provided query.Interface hilbish.editorhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.editor/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.editor/Introduction The hilbish.editor interface provides functions to directly interact with the line editor in use. -Functions getLine() Returns the current input line. -getVimRegister(register) Returns the text that is at the register. +Functions 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. +handler(line, pos) The handler function is the callback for tab completion in Hilbish. You can check the completions doc for more info.Interface hilbish.editorhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.editor/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.editor/Introduction The hilbish.editor interface provides functions to directly interact with the line editor in use. +Functions 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.Interface hilbish.historyhttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.history/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.history/Introduction The history interface deals with command history. This includes the ability to override functions to change the main method of saving history. Functions 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() Returns the amount of commands in the history.Interface hilbish.jobshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.jobs/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.jobs/Introduction Manage interactive jobs in Hilbish via Lua. +size() -> number Returns the amount of commands in the history.Interface hilbish.jobshttps://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.jobs/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/hilbish/hilbish.jobs/Introduction Manage interactive jobs in Hilbish via Lua. 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 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. @@ -31,11 +31,10 @@ These are the simple functions hilbish.interval and hilbish.timeout (doc accessi Interface fields config: The user’s config directory data: The user’s directory for program dataModule baithttps://rosettea.github.io/Hilbish/docs/api/bait/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/bait/Introduction Bait is the event emitter for Hilbish. Why name it bait? Why not. It throws hooks that you can catch. This is what you will use if you want to listen in on hooks to know when certain things have happened, like when you’ve changed directory, a command has failed, etc. To find all available hooks thrown by Hilbish, see doc hooks. Functions catch(name, cb) Catches a hook with name.Module commanderhttps://rosettea.github.io/Hilbish/docs/api/commander/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/commander/Introduction Commander is a library for writing custom commands in Lua. In order to make it easier to write commands for Hilbish, not require separate scripts and to be able to use in a config, the Commander library exists. This is like a very simple wrapper that works with Hilbish for writing commands. Example: local commander = require 'commander' commander.register('hello', function(args, sinks) sinks.out:writeln 'Hello world!' end) In this example, a command with the name of hello is created that will print Hello world!Module fshttps://rosettea.github.io/Hilbish/docs/api/fs/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/fs/Introduction The fs module provides easy and simple access to filesystem functions and other things, and acts an addition to the Lua standard library’s I/O and filesystem functions. -Functions abs(path) Gives an absolute version of path. -basename(path) Gives the basename of path. For the rules, see Go’s filepath.Base +Functions abs(path) -> string Gives an absolute version of 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) Returns the directory part of path. For the rules, see Go’s filepath.Dir -glob(pattern) Glob all files and directories that match the pattern.Module terminalhttps://rosettea.github.io/Hilbish/docs/api/terminal/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/terminal/Introduction The terminal library is a simple and lower level library for certain terminal interactions. +dir(path) -> string Returns the directory part of path. For the rules, see Go’s filepath.Module terminalhttps://rosettea.github.io/Hilbish/docs/api/terminal/Mon, 01 Jan 0001 00:00:00 +0000https://rosettea.github.io/Hilbish/docs/api/terminal/Introduction The terminal library is a simple and lower level library for certain terminal interactions. Functions restoreState() Restores the last saved state of the terminal saveState() Saves the current state of the terminal setRaw() Puts the terminal in raw mode