tarantool / tarantool/tarantool
console.completion: support paths with indexing by square brackets
Open
Nobody has claimed this yet.
feature
- Dominant language
- Lua
- Stars
- 3.7k
- Forks
- 419
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 88
Description
> tabcomplete = function(s)
return require('console').completion_handler(s, 0, #s)
end
> object = {{a =1}, key = {b = 2}}
Now supported only indexing by field
tabcomplete("object.key.")
- - object.key.b
- object.key.b
Add support for:
tabcomplete("object['key'].")
tabcomplete("object[1].")
tabcomplete("object.")
- - object.key
- object[1] # also add this maybe
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the console.completion_handler entry point and trace the existing field-indexing completion logic. Add coverage for object['key']. and object[1]., and determine whether object. should also suggest bracketed indexes; done means these examples return the expected completions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100