mirror of https://github.com/Hilbis/Hilbish
docs: fix duplicate functions header
parent
95ac2e280d
commit
726082ba03
|
@ -435,6 +435,7 @@ func main() {
|
|||
if modu.ParentModule != "" {
|
||||
modOrIface = "Module"
|
||||
}
|
||||
lastHeader := ""
|
||||
|
||||
f, _ := os.Create(docPath)
|
||||
f.WriteString(fmt.Sprintf(header, modOrIface, modname, modu.ShortDescription))
|
||||
|
@ -460,6 +461,7 @@ func main() {
|
|||
}
|
||||
|
||||
f.WriteString("## Functions\n")
|
||||
lastHeader = "functions"
|
||||
|
||||
mdTable := md.NewTable(funcCount, 2)
|
||||
mdTable.SetTitle(0, "")
|
||||
|
@ -511,7 +513,9 @@ func main() {
|
|||
}
|
||||
|
||||
if len(modu.Docs) != 0 {
|
||||
f.WriteString("## Functions\n")
|
||||
if lastHeader != "functions" {
|
||||
f.WriteString("## Functions\n")
|
||||
}
|
||||
for _, dps := range modu.Docs {
|
||||
if dps.IsMember {
|
||||
continue
|
||||
|
|
|
@ -41,7 +41,6 @@ this function will set the user prompt.
|
|||
|<a href="#release">release(name, catcher)</a>|Removes the `catcher` for the event with `name`.|
|
||||
|<a href="#throw">throw(name, ...args)</a>|Throws a hook with `name` with the provided `args`|
|
||||
|
||||
## Functions
|
||||
<hr><div id='catch'>
|
||||
<h4 class='heading'>
|
||||
bait.catch(name, cb)
|
||||
|
|
|
@ -43,7 +43,6 @@ name would suggest.
|
|||
|<a href="#deregister">deregister(name)</a>|Deregisters any command registered with `name`|
|
||||
|<a href="#register">register(name, cb)</a>|Register a command with `name` that runs `cb` when ran|
|
||||
|
||||
## Functions
|
||||
<hr><div id='deregister'>
|
||||
<h4 class='heading'>
|
||||
commander.deregister(name)
|
||||
|
|
|
@ -25,7 +25,6 @@ I/O and filesystem functions.
|
|||
|<a href="#readdir">readdir(dir) -> {}</a>|Returns a table of files in `dir`.|
|
||||
|<a href="#stat">stat(path) -> {}</a>|Returns a table of info about the `path`.|
|
||||
|
||||
## Functions
|
||||
<hr><div id='abs'>
|
||||
<h4 class='heading'>
|
||||
fs.abs(path) -> string
|
||||
|
|
|
@ -46,7 +46,6 @@ interfaces and functions which directly relate to shell functionality.
|
|||
|vimMode|Current Vim input mode of Hilbish (will be nil if not in Vim input mode)|
|
||||
|exitCode|xit code of the last executed command|
|
||||
|
||||
## Functions
|
||||
<hr><div id='alias'>
|
||||
<h4 class='heading'>
|
||||
hilbish.alias(cmd, orig)
|
||||
|
|
|
@ -18,7 +18,6 @@ The alias interface deals with all command aliases in Hilbish.
|
|||
|<a href="#aliases.list">list() -> table<string, string></a>|Get a table of all aliases, with string keys as the alias and the value as the command.|
|
||||
|<a href="#aliases.resolve">resolve(alias) -> command (string)</a>|Tries to resolve an alias to its command.|
|
||||
|
||||
## Functions
|
||||
<hr><div id='aliases.add'>
|
||||
<h4 class='heading'>
|
||||
hilbish.aliases.add(alias, cmd)
|
||||
|
|
|
@ -18,7 +18,6 @@ The completions interface deals with tab completions.
|
|||
|<a href="#completions.bins">bins(query, ctx, fields) -> entries (table), prefix (string)</a>|Returns binary/executale completion candidates based on the provided query.|
|
||||
|<a href="#completions.files">files(query, ctx, fields) -> entries (table), prefix (string)</a>|Returns file completion candidates based on the provided query.|
|
||||
|
||||
## Functions
|
||||
<hr><div id='completions.call'>
|
||||
<h4 class='heading'>
|
||||
hilbish.completions.call(name, query, ctx, fields) -> completionGroups (table), prefix (string)
|
||||
|
|
|
@ -19,7 +19,6 @@ directly interact with the line editor in use.
|
|||
|<a href="#editor.insert">insert(text)</a>|Inserts text into the line.|
|
||||
|<a href="#editor.setVimRegister">setVimRegister(register, text)</a>|Sets the vim register at `register` to hold the passed text.|
|
||||
|
||||
## Functions
|
||||
<hr><div id='editor.getLine'>
|
||||
<h4 class='heading'>
|
||||
hilbish.editor.getLine() -> string
|
||||
|
|
|
@ -21,7 +21,6 @@ method of saving history.
|
|||
|<a href="#history.get">get(idx)</a>|Retrieves a command from the history based on the `idx`.|
|
||||
|<a href="#history.size">size() -> number</a>|Returns the amount of commands in the history.|
|
||||
|
||||
## Functions
|
||||
<hr><div id='history.add'>
|
||||
<h4 class='heading'>
|
||||
hilbish.history.add(cmd)
|
||||
|
|
|
@ -23,7 +23,6 @@ interactive usage or with the functions defined below for use in external runner
|
|||
|<a href="#jobs.get">get(id) -> @Job</a>|Get a job object via its ID.|
|
||||
|<a href="#jobs.last">last() -> @Job</a>|Returns the last added job from the table.|
|
||||
|
||||
## Functions
|
||||
<hr><div id='jobs.add'>
|
||||
<h4 class='heading'>
|
||||
hilbish.jobs.add(cmdstr, args, execPath)
|
||||
|
|
|
@ -21,7 +21,6 @@ write command in Fennel.
|
|||
|<a href="#runner.lua">lua(cmd)</a>|Evaluates `cmd` as Lua input. This is the same as using `dofile`|
|
||||
|<a href="#runner.sh">sh(cmd)</a>|Runs a command in Hilbish's shell script interpreter.|
|
||||
|
||||
## Functions
|
||||
<hr><div id='runner.setMode'>
|
||||
<h4 class='heading'>
|
||||
hilbish.runner.setMode(cb)
|
||||
|
|
|
@ -42,7 +42,6 @@ print(t.running) // true
|
|||
|INTERVAL|Constant for an interval timer type|
|
||||
|TIMEOUT|Constant for a timeout timer type|
|
||||
|
||||
## Functions
|
||||
<hr><div id='timers.create'>
|
||||
<h4 class='heading'>
|
||||
hilbish.timers.create(type, time, callback) -> <a href="/Hilbish/docs/api/hilbish/hilbish.timers/#timer" style="text-decoration: none;" id="lol">Timer</a>
|
||||
|
|
|
@ -18,7 +18,6 @@ The terminal library is a simple and lower level library for certain terminal in
|
|||
|<a href="#setRaw">setRaw()</a>|Puts the terminal in raw mode|
|
||||
|<a href="#size">size()</a>|Gets the dimensions of the terminal. Returns a table with `width` and `height`|
|
||||
|
||||
## Functions
|
||||
<hr><div id='restoreState'>
|
||||
<h4 class='heading'>
|
||||
terminal.restoreState()
|
||||
|
|
Loading…
Reference in New Issue