autocomplete icon indicating copy to clipboard operation
autocomplete copied to clipboard

feat(pr): add completion

Open mamercad opened this issue 3 years ago • 5 comments
trafficstars

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

mamercad avatar May 29 '22 06:05 mamercad

Overview

src/pr.ts:

Info:

withfig-bot avatar May 29 '22 06:05 withfig-bot

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 args property (args: {})?
  • [ ] Are all options modular? E.g. -a -u -x instead of -aux
  • [ ] Have all other checks passed?

Please add a 👍 as a reaction to this comment to show that you read this.

withfig-bot avatar May 29 '22 06:05 withfig-bot

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"]
}
]

fedeci avatar May 31 '22 08:05 fedeci

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!

clo4 avatar May 31 '22 09:05 clo4

Thanks!

fedeci avatar May 31 '22 09:05 fedeci

...I'm not sure what to do, closing.

mamercad avatar Oct 05 '22 19:10 mamercad