diff --git a/CHANGELOG.md b/CHANGELOG.md index c3a2c66..63f1778 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - `flush()` and `autoFlush()` related to flushing outputs - `pipe` property to check if a sink with input is a pipe (like stdin) - Show indexes on cdr list +- Fix doc command not displaying correct subdocs when using shorthand api doc access (`doc api hilbish.jobs` as an example) ### Fixed - Replaced `sed` in-place editing with `grep` and `mv` for compatibility with BSD utils diff --git a/nature/commands/doc.lua b/nature/commands/doc.lua index 15714d8..9653657 100644 --- a/nature/commands/doc.lua +++ b/nature/commands/doc.lua @@ -39,7 +39,7 @@ Available sections: ]] .. table.concat(modules, ', ') subdocName = '_index' end f = io.open(moddocPath .. subdocName .. '.md', 'rb') - local oldmoddocPath + local oldmoddocPath = moddocPath if not f then moddocPath = moddocPath .. subdocName:match '%w+' .. '/' f = io.open(moddocPath .. subdocName .. '.md', 'rb')