2
2
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:
sammyette 2025-03-17 21:47:53 -04:00
parent 2399c45960
commit 2e9925ef2a
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
6 changed files with 1257 additions and 16 deletions

View File

@ -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)
@ -161,6 +165,7 @@ for iface, dps in pairs(pieces) do
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\n\n', param.description))
end
--[[
local params = table.filter(docs, function(t)

File diff suppressed because it is too large Load Diff

View File

@ -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>

View File

@ -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>

View File

@ -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