Compare commits

..

No commits in common. "109b5785af3421b55da241bd300c3d52d5378346" and "887260cd8ab539f3e9253d33b10cb6e72579fac6" have entirely different histories.

4 changed files with 6 additions and 13 deletions

View File

@ -92,9 +92,9 @@ func (a *aliasModule) Loader(rtm *rt.Runtime) *rt.Table {
func _hlalias() {} func _hlalias() {}
// #interface aliases // #interface aliases
// list() -> table<string, string> // list() -> aliases (table)
// Get a table of all aliases, with string keys as the alias and the value as the command. // Get a table of all aliases, with string keys as the alias and the value as the command.
// --- @returns table<string, string> // @returns table<string, string>
func (a *aliasModule) luaList(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) { func (a *aliasModule) luaList(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
aliasesList := rt.NewTable() aliasesList := rt.NewTable()
for k, v := range a.All() { for k, v := range a.All() {

View File

@ -17,8 +17,9 @@ This is an alias (ha) for the `hilbish.alias` function.
### delete(name) ### delete(name)
Removes an alias. Removes an alias.
### list() -> table<string, string> ### list() -> aliases (table)
Get a table of all aliases, with string keys as the alias and the value as the command. Get a table of all aliases, with string keys as the alias and the value as the command.
@returns table<string, string>
### resolve(alias) -> command (string) ### resolve(alias) -> command (string)
Tries to resolve an alias to its command. Tries to resolve an alias to its command.

View File

@ -4,11 +4,6 @@ local lunacolors = require 'lunacolors'
commander.register('doc', function(args) commander.register('doc', function(args)
local moddocPath = hilbish.dataDir .. '/docs/' local moddocPath = hilbish.dataDir .. '/docs/'
local stat = fs.stat '.git/refs/heads/extended-job-api'
if stat then
-- hilbish git
moddocPath = './docs/'
end
local apidocHeader = [[ local apidocHeader = [[
# %s # %s
{grayBg} {white}{italic}%s {reset} {grayBg} {white}{italic}%s {reset}
@ -29,9 +24,6 @@ commander.register('doc', function(args)
subdocName = '_index' subdocName = '_index'
end end
f = io.open(moddocPath .. subdocName .. '.md', 'rb') f = io.open(moddocPath .. subdocName .. '.md', 'rb')
if not f then
f = io.open(moddocPath .. subdocName:match '%w+' .. '/' .. subdocName .. '.md', 'rb')
end
if not f then if not f then
moddocPath = moddocPath .. subdocName .. '/' moddocPath = moddocPath .. subdocName .. '/'
subdocName = args[3] or '_index' subdocName = args[3] or '_index'
@ -39,7 +31,7 @@ commander.register('doc', function(args)
end end
if not f then if not f then
print('No documentation found for ' .. mod .. '.') print('No documentation found for ' .. mod .. '.')
return 1 return
end end
end end
funcdocs = f:read '*a':gsub('-([%d]+)', '%1') funcdocs = f:read '*a':gsub('-([%d]+)', '%1')

View File

@ -11,7 +11,7 @@ var (
// Version info // Version info
var ( var (
ver = "v2.1.0" ver = "v2.0.1"
releaseName = "Hibiscus" releaseName = "Hibiscus"
gitCommit string gitCommit string
gitBranch string gitBranch string