Rosettea / Hilbish

🌓 The Moon-powered shell! A comfy and extensible shell for Lua fans! 🌺 ✨
https://rosettea.github.io/Hilbish/
MIT License
496 stars 21 forks source link

Confusing documentation #270

Closed CapedBojji closed 9 months ago

CapedBojji commented 9 months ago

is it possible to just show pictures of code instead of confusing explanations. The completion documentation makes no sense to me, if i want to enable custom completions, do i use the handler function or do i use the other 3 what is the purpose of the other 3. A simple image of the code and what it produces is all is needed

image

look at how simple nushell does it. thats all it takes to understand how it works

TorchedSammy commented 9 months ago

i'm working on improving the docs in #260 but i've also been doing other things irl.

to make completions for a command, here's an example:

hilbish.complete('command.animal', function(query, ctx, fields)
    local comp = {
        {
            items = {'dog', 'cat'},
            type = 'grid'
        }
    }

    return comp, query
end)

this is the bare minimum. it turns comp and the prefix, so you'll have to cut your completion string for it to work properly. if you have any suggestions on how to improve the docs that would be great, since the "confusing explanation" is still needed.