--- title: Module hilbish description: layout: doc menu: docs: parent: "API" --- ## Introduction ## Functions ``` =html
alias(cmd, orig) | Sets an alias, with a name of `cmd` to another command. |
appendPath(dir) | Appends the provided dir to the command path (`$PATH`) |
complete(scope, cb) | Registers a completion handler for the specified scope. |
cwd() -> string | Returns the current directory of the shell. |
exec(cmd) | Replaces the currently running Hilbish instance with the supplied command. |
goro(fn) | Puts `fn` in a Goroutine. |
highlighter(line) | Line highlighter handler. |
hinter(line, pos) | The command line hint handler. It gets called on every key insert to |
inputMode(mode) | Sets the input mode for Hilbish's line reader. |
interval(cb, time) -> @Timer | Runs the `cb` function every specified amount of `time`. |
multiprompt(str) | Changes the text prompt when Hilbish asks for more input. |
prependPath(dir) | Prepends `dir` to $PATH. |
prompt(str, typ) | Changes the shell prompt to the provided string. |
read(prompt) -> input (string) | Read input from the user, using Hilbish's line editor/input reader. |
timeout(cb, time) -> @Timer | Executed the `cb` function after a period of `time`. |
which(name) -> string | Checks if `name` is a valid command. |