diff --git a/docs/hilbish.txt b/docs/hilbish.txt index a32d90e..f466cba 100644 --- a/docs/hilbish.txt +++ b/docs/hilbish.txt @@ -37,6 +37,12 @@ Returns `input`, will be nil if ctrl + d is pressed, or an error occurs (which s run(cmd) > Runs `cmd` in Hilbish's sh interpreter. +runnerMode(mode) > Sets the execution/runner mode for interactive Hilbish. This determines whether +Hilbish wll try to run input as Lua and/or sh or only do one of either. +Accepted values for mode are hybrid (the default), hybridRev (sh first then Lua), +sh, and lua. It also accepts a function, to which if it is passed one +will call it to execute user input instead. + timeout(cb, time) > Runs the `cb` function after `time` in milliseconds which(binName) > Searches for an executable called `binName` in the directories of $PATH diff --git a/emmyLuaDocs/hilbish.lua b/emmyLuaDocs/hilbish.lua index d0d5068..214086e 100644 --- a/emmyLuaDocs/hilbish.lua +++ b/emmyLuaDocs/hilbish.lua @@ -69,6 +69,13 @@ function hilbish.read(prompt) end --- @param cmd string function hilbish.run(cmd) end +--- Sets the execution/runner mode for interactive Hilbish. This determines whether +--- Hilbish wll try to run input as Lua and/or sh or only do one of either. +--- Accepted values for mode are hybrid (the default), hybridRev (sh first then Lua), +--- sh, and lua. It also accepts a function, to which if it is passed one +--- will call it to execute user input instead. +function hilbish.runnerMode() end + --- Runs the `cb` function after `time` in milliseconds --- @param cb function --- @param time number