autocomplete
autocomplete copied to clipboard
feat(pr): add completion
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
New completion
What is the current behavior? (You can also link to an open issue here)
There is no completion for pr
What is the new behavior (if this is a feature change)?
There will be completion for pr
Additional info:
man pr
Overview
src/pr.ts:
Info:
Hello @mamercad, thank you very much for creating a Pull Request! Here is a small checklist to get this PR merged as quickly as possible:
- [ ] Do all subcommands / options which take arguments include the
argsproperty (args: {})? - [ ] Are all options modular? E.g.
-a-u-xinstead of-aux - [ ] Have all other checks passed?
Please add a 👍 as a reaction to this comment to show that you read this.
I am also currently under exam session so I am not really into making potentially breaking changes to the engine, @SeparateRecords we can chat with Sean about this but it's likely a bug that if I have two following arguments where the first of them is optional I am not receiving suggestions for both the args. e.g.
// I should receive both `+` and filepaths suggestions at the same time. When + gets inserted only filepaths should show up
args: [
{
suggestions: ["+"],
isOptional: true,
},
{
template: ["filepaths"]
}
]
I handled this in my parser by allowing options named - and + that must take an argument in the same token (and for fun, allowing option chaining where the option name is two characters and begins with - or +). That was a very small change in mine, but I don't know how it's structured in the autocomplete engine. Happy to take a look and get Sean to review!
Thanks!
...I'm not sure what to do, closing.