2022-12-15 04:00:54 +00:00
|
|
|
---
|
2023-08-26 15:30:51 +00:00
|
|
|
title: Module hilbish.runner
|
2022-12-15 04:00:54 +00:00
|
|
|
description: interactive command runner customization
|
|
|
|
layout: doc
|
|
|
|
menu:
|
|
|
|
docs:
|
|
|
|
parent: "API"
|
|
|
|
---
|
|
|
|
|
|
|
|
## Introduction
|
|
|
|
The runner interface contains functions that allow the user to change
|
|
|
|
how Hilbish interprets interactive input.
|
|
|
|
Users can add and change the default runner for interactive input to any
|
|
|
|
language or script of their choosing. A good example is using it to
|
|
|
|
write command in Fennel.
|
|
|
|
|
|
|
|
## Functions
|
2023-08-26 15:30:51 +00:00
|
|
|
### hilbish.runner.setMode(cb)
|
2022-12-15 04:00:54 +00:00
|
|
|
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.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2022-12-15 04:00:54 +00:00
|
|
|
|
2023-08-26 15:30:51 +00:00
|
|
|
### hilbish.runner.lua(cmd)
|
2022-12-15 04:00:54 +00:00
|
|
|
Evaluates `cmd` as Lua input. This is the same as using `dofile`
|
|
|
|
or `load`, but is appropriated for the runner interface.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2022-12-15 04:00:54 +00:00
|
|
|
|
2023-08-26 15:30:51 +00:00
|
|
|
### hilbish.runner.sh(cmd)
|
2022-12-15 04:00:54 +00:00
|
|
|
Runs a command in Hilbish's shell script interpreter.
|
|
|
|
This is the equivalent of using `source`.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2022-12-15 04:00:54 +00:00
|
|
|
|