mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-20 20:43:23 +00:00
feat: add description gen, and more spacing between param listing
This commit is contained in:
parent
2399c45960
commit
2e9925ef2a
@ -49,10 +49,14 @@ for _, fname in ipairs(files) do
|
||||
|
||||
if emmy then
|
||||
if emmy == 'param' then
|
||||
print('bruh', emmythings[1], emmythings[2])
|
||||
table.insert(dps.params, 1, {
|
||||
name = emmythings[1],
|
||||
type = emmythings[2]
|
||||
type = emmythings[2],
|
||||
-- the +1 accounts for space.
|
||||
description = table.concat(emmythings, ' '):sub(emmythings[1]:len() + 1 + emmythings[2]:len() + 1)
|
||||
})
|
||||
print(table.concat(emmythings, '/'))
|
||||
end
|
||||
else
|
||||
table.insert(dps.description, 1, docline)
|
||||
@ -160,7 +164,8 @@ for iface, dps in pairs(pieces) do
|
||||
f:write 'This function has no parameters. \n'
|
||||
end
|
||||
for _, param in ipairs(docs.params) do
|
||||
f:write(string.format('`%s` **`%s`**\n', param.name:gsub('%?$', ''), param.type))
|
||||
f:write(string.format('`%s` **`%s`** \n', param.name:gsub('%?$', ''), param.type))
|
||||
f:write(string.format('%s\n\n', param.description))
|
||||
end
|
||||
--[[
|
||||
local params = table.filter(docs, function(t)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -146,6 +146,8 @@ hilbish.runner.setCurrent(name)
|
||||
Sets the current interactive/command line runner mode.
|
||||
#### Parameters
|
||||
`name` **`string`**
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@ -161,7 +163,11 @@ Adds a runner to the table of available runners. If runner is a table,
|
||||
it must have the run function in it.
|
||||
#### Parameters
|
||||
`name` **`string`**
|
||||
`runner` **`function`**
|
||||
|
||||
|
||||
`runner` **`function|table`**
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@ -176,6 +182,8 @@ hilbish.runner.get(name)
|
||||
Get a runner by name.
|
||||
#### Parameters
|
||||
`name` **`string`**
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@ -190,7 +198,11 @@ hilbish.runner.set(name, runner)
|
||||
Sets a runner by name. The runner table must have the run function in it.
|
||||
#### Parameters
|
||||
`name` **`string`**
|
||||
|
||||
|
||||
`runner` **`table`**
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@ -206,6 +218,10 @@ Executes cmd with a runner. If runnerName isn't passed, it uses
|
||||
the user's current runner.
|
||||
#### Parameters
|
||||
`cmd` **`string`**
|
||||
|
||||
|
||||
`runnerName` **`string?`**
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -19,6 +19,8 @@ dirs.setOld(d)
|
||||
Sets the old directory string.
|
||||
#### Parameters
|
||||
`d` **`string`**
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@ -47,6 +49,8 @@ dirs.peak(num)
|
||||
Look at `num` amount of recent directories, starting from the latest.
|
||||
#### Parameters
|
||||
`num` **`number`**
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@ -61,6 +65,8 @@ dirs.pop(num)
|
||||
Remove the specified amount of dirs from the recent directories list.
|
||||
#### Parameters
|
||||
`num` **`number`**
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
@ -75,5 +81,7 @@ dirs.recent(idx)
|
||||
Get entry from recent directories list based on index.
|
||||
#### Parameters
|
||||
`idx` **`number`**
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -53,7 +53,7 @@ function hilbish.messages.read(idx)
|
||||
end
|
||||
end
|
||||
|
||||
function hilbish.messages.readAll(idx)
|
||||
function hilbish.messages.readAll()
|
||||
for _, msg in ipairs(hilbish.messages.all()) do
|
||||
hilbish.messages.read(msg.index)
|
||||
end
|
||||
@ -63,6 +63,7 @@ function hilbish.messages.unreadCount()
|
||||
return unread
|
||||
end
|
||||
|
||||
--- Deletes the message at `idx`.
|
||||
function hilbish.messages.delete(idx)
|
||||
local msg = M._messages[idx]
|
||||
if not msg then
|
||||
|
@ -21,7 +21,7 @@ end
|
||||
--- Adds a runner to the table of available runners. If runner is a table,
|
||||
--- it must have the run function in it.
|
||||
--- @param name string
|
||||
--- @param runner function | table
|
||||
--- @param runner function|table
|
||||
function hilbish.runner.add(name, runner)
|
||||
if type(name) ~= 'string' then
|
||||
error 'expected runner name to be a table'
|
||||
|
Loading…
x
Reference in New Issue
Block a user